From: Karl Heuer Date: Thu, 4 Dec 1997 04:39:00 +0000 (+0000) Subject: (inferior-octave-directory-tracker): X-Git-Tag: emacs-20.3~2672 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a04f05bdd62fadd771e3e357dda468aa2b1f34e8;p=emacs.git (inferior-octave-directory-tracker): Anchor regexp match to beginning of command string. --- diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 5be9e94cc46..d026a06bb71 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -336,7 +336,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)))))