# HG changeset patch # User Eli Zaretskii # Date 1133002282 0 # Node ID e0b37eeb2f0b016068b1969aa355a221d0a196f3 # Parent e359d7d32d8e9f7ff45f2099b6393b99e9df8fde (inferior-octave-startup): Force a non-empty string for secondary prompt PS2. diff -r e359d7d32d8e -r e0b37eeb2f0b lisp/progmodes/octave-inf.el --- 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))