# HG changeset patch # User Stephen Eglen # Date 931380552 0 # Node ID ea5923fcc5b230b39440f90f0b025b5514a1d844 # Parent 6ba667635e105b3357a0768e2b6dfdcdecb2d3cc inferior-octave-directory-tracker: Change regexp so that it doesn't think functions beginning with `cd' are directory-changing commands. diff -r 6ba667635e10 -r ea5923fcc5b2 lisp/progmodes/octave-inf.el --- a/lisp/progmodes/octave-inf.el Wed Jul 07 16:45:31 1999 +0000 +++ b/lisp/progmodes/octave-inf.el Wed Jul 07 20:49:12 1999 +0000 @@ -351,9 +351,11 @@ (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;]" - string) - (cd (substring string (match-beginning 1) (match-end 1))))) + (cond + ((string-match "^[ \t]*cd[ \t;]*$" string) + (cd "~")) + ((string-match "^[ \t]*cd[ \t]+\\([^ \t\n;]*\\)[ \t\n;]*" string) + (cd (substring string (match-beginning 1) (match-end 1)))))) (defun inferior-octave-resync-dirs () "Resync the buffer's idea of the current directory.