summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-12-04 04:39:00 +0000
committerKarl Heuer <kwzh@gnu.org>1997-12-04 04:39:00 +0000
commita04f05bdd62fadd771e3e357dda468aa2b1f34e8 (patch)
treebee40775eb3644f80350484a216c0ac508bf92cd
parent524d06f590ee3df21f46f8f4a07783984bf0cd30 (diff)
downloademacs-a04f05bdd62fadd771e3e357dda468aa2b1f34e8.tar.gz
(inferior-octave-directory-tracker):
Anchor regexp match to beginning of command string.
-rw-r--r--lisp/progmodes/octave-inf.el2
1 files changed, 1 insertions, 1 deletions
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)))))