]> git.eshelyaron.com Git - emacs.git/commitdiff
(inferior-octave-directory-tracker):
authorKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:39:00 +0000 (04:39 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:39:00 +0000 (04:39 +0000)
Anchor regexp match to beginning of command string.

lisp/progmodes/octave-inf.el

index 5be9e94cc469f3ef778713dcf0db49b0b4d7374d..d026a06bb7171239a09b7742b845575be6c8bc0e 100644 (file)
@@ -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)))))