changeset 67129:e0b37eeb2f0b

(inferior-octave-startup): Force a non-empty string for secondary prompt PS2.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 26 Nov 2005 10:51:22 +0000
parents e359d7d32d8e
children c5ff1098b0b8
files lisp/progmodes/octave-inf.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/octave-inf.el	Sat Nov 26 10:10:31 2005 +0000
+++ b/lisp/progmodes/octave-inf.el	Sat Nov 26 10:51:22 2005 +0000
@@ -220,6 +220,13 @@
 	  (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))