]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/octave-inf.el
Changed version to 1.2.1.
[gnu-emacs] / lisp / progmodes / octave-inf.el
index 12b29550f578b01771602ffa07d33f9250d2d81b..097c8649f8bf8d16de192fd517dbd60891c79ab8 100644 (file)
@@ -1,6 +1,6 @@
-;; octave-inf.el --- running Octave as an inferior Emacs process
+;;; octave-inf.el --- running Octave as an inferior Emacs process
 
-;;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997 Free Software Foundation, Inc.
 
 ;; Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
 ;; Author: John Eaton <jwe@bevo.che.wisc.edu>
 (require 'octave-mod)
 (require 'comint)
 
-(defvar inferior-octave-program "octave"
-  "*Program invoked by `inferior-octave'.")
+(defgroup octave-inferior nil
+  "Running Octave as an inferior Emacs process."
+  :group 'octave)
 
-(defvar inferior-octave-prompt "\\(^octave\\(:[0-9]+\\)?\\|^\\)>+ "
-  "*Regexp to match prompts for the inferior Octave process.")
+(defcustom inferior-octave-program "octave"
+  "*Program invoked by `inferior-octave'."
+  :type 'string
+  :group 'octave-inferior)
 
-(defvar inferior-octave-startup-file nil
+(defcustom inferior-octave-prompt
+  "\\(^octave\\(\\|.bin\\)\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ "
+  "*Regexp to match prompts for the inferior Octave process."
+  :type 'regexp
+  :group 'octave-inferior)
+
+(defcustom inferior-octave-startup-file nil
   "*Name of the inferior Octave startup file.
 The contents of this file are sent to the inferior Octave process on
-startup.")
+startup."
+  :type '(choice (const :tag "None" nil)
+                file)
+  :group 'octave-inferior)
 
-(defvar inferior-octave-startup-args nil
+(defcustom inferior-octave-startup-args '("-i")
   "*List of command line arguments for the inferior Octave process.
 For example, for suppressing the startup message and using `traditional'
-mode, set this to (\"-q\" \"--traditional\").")
+mode, set this to (\"-q\" \"--traditional\")."
+  :type '(repeat string)
+  :group 'octave-inferior)
 
 (defvar inferior-octave-mode-map nil
   "Keymap used in Inferior Octave mode.")
@@ -68,8 +82,10 @@ mode, set this to (\"-q\" \"--traditional\").")
     (modify-syntax-entry ?\n ">" table)
     (setq inferior-octave-mode-syntax-table table)))
 
-(defvar inferior-octave-mode-hook nil
-  "*Hook to be run when Inferior Octave mode is started.")
+(defcustom inferior-octave-mode-hook nil
+  "*Hook to be run when Inferior Octave mode is started."
+  :type 'hook
+  :group 'octave-inferior)
 
 (defvar inferior-octave-font-lock-keywords
   (list
@@ -335,7 +351,7 @@ output is passed to the filter `inferior-octave-output-digest'."
 (defun inferior-octave-directory-tracker (string)
   "Tracks `cd' commands issued to the inferior Octave process.
 Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused."
-  (if (string-match "[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]"
+  (if (string-match "^[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]"
                    string)
       (cd (substring string (match-beginning 1) (match-end 1)))))