diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/octave-inf.el | 2 |
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))))) |