]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/octave.el (inferior-octave-startup): Fix bug#14433.
authorLeo Liu <sdl.web@gmail.com>
Wed, 22 May 2013 15:28:42 +0000 (23:28 +0800)
committerLeo Liu <sdl.web@gmail.com>
Wed, 22 May 2013 15:28:42 +0000 (23:28 +0800)
lisp/ChangeLog
lisp/progmodes/octave.el

index 66d108ebbe09baaeb5e4c1ab8c56a912bece76c4..36ee6a1a64b3045864c1e09e4c8cb3a79983c68e 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-22  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/octave.el (inferior-octave-startup): Fix bug#14433.
+
 2013-05-22  Michael Albinus  <michael.albinus@gmx.de>
 
        * autorevert.el (auto-revert-notify-add-watch)
index 6469abfe43f9f0714d48edcb45192ce146fd94b4..62bef6dfdea5ad861b0a2f60dc372b9473ba52fc 100644 (file)
@@ -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