changeset 5562:2299097cf9f2

[project @ 2005-12-05 19:15:50 by jwe]
author jwe
date Mon, 05 Dec 2005 19:15:50 +0000
parents bdd6e60e54fb
children a75de3db5c37
files ChangeLog emacs/octave-inf.el
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-05  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
+
+	* emacs/octave-inf.el (inferior-octave-startup):
+	Force a non-empty string for secondary prompt PS2.
+
 2005-12-02  John W. Eaton  <jwe@octave.org>
 
 	* emacs/octave-mod.el (octave-electric-space): Don't indent
--- a/emacs/octave-inf.el
+++ b/emacs/octave-inf.el
@@ -219,6 +219,14 @@
 	  (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))