diff options
Diffstat (limited to 'lisp/progmodes/octave.el')
-rw-r--r-- | lisp/progmodes/octave.el | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index bda4e60c55c..f295917c0ad 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1512,28 +1512,12 @@ current buffer file unless called with a prefix arg \\[universal-argument]." (interactive "r") (inferior-octave t) (let ((proc inferior-octave-process) - (string (buffer-substring-no-properties beg end)) - line) + (string (buffer-substring-no-properties beg end))) (with-current-buffer inferior-octave-buffer ;; https://lists.gnu.org/r/emacs-devel/2013-10/msg00095.html (compilation-forget-errors) - (setq inferior-octave-output-list nil) - (while (not (string-equal string "")) - (if (string-match "\n" string) - (setq line (substring string 0 (match-beginning 0)) - string (substring string (match-end 0))) - (setq line string string "")) - (setq inferior-octave-receive-in-progress t) - (inferior-octave-send-list-and-digest (list (concat line "\n"))) - (while inferior-octave-receive-in-progress - (accept-process-output proc)) - (insert-before-markers - (mapconcat 'identity - (append - (if octave-send-echo-input (list line) (list "")) - inferior-octave-output-list - (list inferior-octave-output-string)) - "\n"))))) + (insert-before-markers string "\n") + (comint-send-string proc (concat string "\n")))) (if octave-send-show-buffer (display-buffer inferior-octave-buffer))) |