diff lisp/progmodes/octave-inf.el @ 20401:1ed464f56e6e

(inferior-octave-directory-tracker): Anchor regexp match to beginning of command string.
author Karl Heuer <kwzh@gnu.org>
date Thu, 04 Dec 1997 04:39:00 +0000
parents 0457d32c5b05
children 6f55b3849106
line wrap: on
line diff
--- a/lisp/progmodes/octave-inf.el	Thu Dec 04 04:36:46 1997 +0000
+++ b/lisp/progmodes/octave-inf.el	Thu Dec 04 04:39:00 1997 +0000
@@ -336,7 +336,7 @@
 (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)))))