From: Leo Liu Date: Wed, 22 May 2013 15:28:42 +0000 (+0800) Subject: * progmodes/octave.el (inferior-octave-startup): Fix bug#14433. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~227^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85d090a95c63473ea9353663c7d47e3c796b21a0;p=emacs.git * progmodes/octave.el (inferior-octave-startup): Fix bug#14433. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66d108ebbe0..36ee6a1a64b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-05-22 Leo Liu + + * progmodes/octave.el (inferior-octave-startup): Fix bug#14433. + 2013-05-22 Michael Albinus * autorevert.el (auto-revert-notify-add-watch) diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 6469abfe43f..62bef6dfdea 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -770,20 +770,17 @@ startup file, `~/.emacs-octave'." (when (and inferior-octave-startup-file (file-exists-p inferior-octave-startup-file)) (format "source (\"%s\");\n" inferior-octave-startup-file)))) - (insert-before-markers - (concat - (if inferior-octave-output-list - (concat (mapconcat - 'identity inferior-octave-output-list "\n") - "\n")) - inferior-octave-output-string)) + (when inferior-octave-output-list + (insert-before-markers + (mapconcat 'identity inferior-octave-output-list "\n"))) ;; And finally, everything is back to normal. (set-process-filter proc 'comint-output-filter) ;; Just in case, to be sure a cd in the startup file ;; won't have detrimental effects. (inferior-octave-resync-dirs) - ;; A trick to get the prompt highlighted. + ;; Generate a proper prompt, which is critical to + ;; `comint-history-isearch-backward-regexp'. Bug#14433. (comint-send-string proc "\n"))) (defvar inferior-octave-completion-table