# HG changeset patch # User Karl Heuer # Date 881210340 0 # Node ID 1ed464f56e6e0dbfbe41c1841d2e51baa73895ee # Parent fd74979309d3cadfccb4e3aa3a748fa697c09e19 (inferior-octave-directory-tracker): Anchor regexp match to beginning of command string. diff -r fd74979309d3 -r 1ed464f56e6e lisp/progmodes/octave-inf.el --- 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)))))