aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Eglen1999-07-07 20:49:12 +0000
committerStephen Eglen1999-07-07 20:49:12 +0000
commitdf287ddb468cb9c56853bca6076f496b5dc827a9 (patch)
treeb5b42aef8995636ac10e36dfcf292651caba6e85
parentea0d05b411ea83d5aed8e6d65b3014740d85d396 (diff)
downloademacs-df287ddb468cb9c56853bca6076f496b5dc827a9.tar.gz
emacs-df287ddb468cb9c56853bca6076f496b5dc827a9.zip
inferior-octave-directory-tracker: Change regexp so that it doesn't
think functions beginning with `cd' are directory-changing commands.
-rw-r--r--lisp/progmodes/octave-inf.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 097c8649f8b..3c8f0e81e91 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -351,9 +351,11 @@ output is passed to the filter `inferior-octave-output-digest'."
351(defun inferior-octave-directory-tracker (string) 351(defun inferior-octave-directory-tracker (string)
352 "Tracks `cd' commands issued to the inferior Octave process. 352 "Tracks `cd' commands issued to the inferior Octave process.
353Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused." 353Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused."
354 (if (string-match "^[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]" 354 (cond
355 string) 355 ((string-match "^[ \t]*cd[ \t;]*$" string)
356 (cd (substring string (match-beginning 1) (match-end 1))))) 356 (cd "~"))
357 ((string-match "^[ \t]*cd[ \t]+\\([^ \t\n;]*\\)[ \t\n;]*" string)
358 (cd (substring string (match-beginning 1) (match-end 1))))))
357 359
358(defun inferior-octave-resync-dirs () 360(defun inferior-octave-resync-dirs ()
359 "Resync the buffer's idea of the current directory. 361 "Resync the buffer's idea of the current directory.