]> git.eshelyaron.com Git - emacs.git/commitdiff
(inferior-octave-startup): Force a non-empty string for secondary prompt PS2.
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Nov 2005 10:51:22 +0000 (10:51 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 Nov 2005 10:51:22 +0000 (10:51 +0000)
lisp/progmodes/octave-inf.el

index 4f0875bbf997b157c23d588cb2b46d739940cb28..67b5b108fa5b19eb26ad4ce75cc86ba2b1635343 100644 (file)
@@ -220,6 +220,13 @@ startup file, `~/.emacs-octave'."
          (concat (mapconcat
                   'identity inferior-octave-output-list "\n")
                  "\n"))))
+
+    ;; An empty secondary prompt, as e.g. obtained by '--braindead',
+    ;; means trouble.
+    (inferior-octave-send-list-and-digest (list "PS2\n"))
+    (if (string-match "^PS2 = *$" (car inferior-octave-output-list))
+       (inferior-octave-send-list-and-digest (list "PS2 = \"> \"\n")))
+
     ;; O.k., now we are ready for the Inferior Octave startup commands.
     (let* (commands
           (program (file-name-nondirectory inferior-octave-program))