Teach inferior-octave-startup to handle Octave > 3.7
authorLeo Liu <sdl.web@gmail.com>
Sat, 18 May 2013 03:17:35 +0000 (11:17 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 18 May 2013 03:17:35 +0000 (11:17 +0800)
lisp/ChangeLog
lisp/progmodes/octave.el

index 87f0e52..b4bb56a 100644 (file)
@@ -1,7 +1,7 @@
 2013-05-18  Leo Liu  <sdl.web@gmail.com>
 
        * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR
-       instead.
+       instead.  Include "--no-gui" to prevent hangs for Octave > 3.7.
        (octave-source-directories): Don't check process.
        (octave-source-directories, octave-find-definition): Doc fix.
 
index 03da409..df03251 100644 (file)
@@ -707,6 +707,11 @@ startup file, `~/.emacs-octave'."
                inferior-octave-buffer
                inferior-octave-program
                (append (list "-i" "--no-line-editing")
+                       ;; --no-gui is introduced in Octave > 3.7
+                       (when (zerop (process-file inferior-octave-program
+                                                  nil nil nil
+                                                  "--no-gui" "--help"))
+                         (list "--no-gui"))
                        inferior-octave-startup-args))))
     (set-process-filter proc 'inferior-octave-output-digest)
     (setq inferior-octave-process proc