From 85d090a95c63473ea9353663c7d47e3c796b21a0 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 22 May 2013 23:28:42 +0800 Subject: [PATCH] * progmodes/octave.el (inferior-octave-startup): Fix bug#14433. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/octave.el | 13 +++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) 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 -- 2.39.2