From: Uwe B. <ou...@ma...> - 2012-02-08 15:55:39
|
Hello I am sorry that I missed the change to the new list. Here is a copy of an email I just sent to the old list (and to Eric) I tested this in GNU emacs Xemacs 21.5.31 and Xemacs 21.4.21: matlab-shell-run-cell can only run one cell, all others cells below are ignored: the cells of the following example ,---- | %% | x=8 | | | %% | y=91 | `---- Are executed in the built in editor but in all the Emacsen I tested only x=8 is executed, the other command is ignored which is odd. The only solution consists to use narrow-to-region for a cell and then use the function: matlab-shell-run-cell. So I presume the function should be modfied. I tried that but I can't get narrow-to-region (narrow-to-region start end) to work: (defun matlab-shell-run-cell () "Run the cell the cursor is in." (interactive) (let ((start (save-excursion (forward-page -1) (if (looking-at "function") (error "You are not in a cell. Try `matlab-shell-save-and-go' instead")) (when (matlab-ltype-comm) ;; Skip over starting comment from the current cell. (matlab-end-of-command 1) (end-of-line) (forward-char 1)) (point))) (end (save-excursion (forward-page 1) (when (matlab-ltype-comm) (beginning-of-line) (forward-char -1)) (point)))) (save-restriction (progn (narrow-to-region start end) (matlab-shell-run-region start end))))) Uwe Brauer |