From: Eli Zaretskii Date: Sat, 26 Nov 2005 10:51:22 +0000 (+0000) Subject: (inferior-octave-startup): Force a non-empty string for secondary prompt PS2. X-Git-Tag: emacs-pretest-22.0.90~5671 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=107dd21bcae503fa862f242006253b7f2738bfe3;p=emacs.git (inferior-octave-startup): Force a non-empty string for secondary prompt PS2. --- diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 4f0875bbf99..67b5b108fa5 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -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))