changeset 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 fd74979309d3
children 108100aa1991
files lisp/progmodes/octave-inf.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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)))))