From 107dd21bcae503fa862f242006253b7f2738bfe3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Nov 2005 10:51:22 +0000 Subject: [PATCH] (inferior-octave-startup): Force a non-empty string for secondary prompt PS2. --- lisp/progmodes/octave-inf.el | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 2.39.5