Commit a04f05bd authored by Karl Heuer's avatar Karl Heuer
Browse files

(inferior-octave-directory-tracker):

Anchor regexp match to beginning of command string.
parent 524d06f5
...@@ -336,7 +336,7 @@ output is passed to the filter `inferior-octave-output-digest'." ...@@ -336,7 +336,7 @@ output is passed to the filter `inferior-octave-output-digest'."
(defun inferior-octave-directory-tracker (string) (defun inferior-octave-directory-tracker (string)
"Tracks `cd' commands issued to the inferior Octave process. "Tracks `cd' commands issued to the inferior Octave process.
Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused." 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) string)
(cd (substring string (match-beginning 1) (match-end 1))))) (cd (substring string (match-beginning 1) (match-end 1)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment