Commit df287ddb authored by Stephen Eglen's avatar Stephen Eglen
Browse files

inferior-octave-directory-tracker: Change regexp so that it doesn't

think functions beginning with `cd' are directory-changing commands.
parent ea0d05b4
......@@ -351,9 +351,11 @@ 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;]"
(cd (substring string (match-beginning 1) (match-end 1)))))
((string-match "^[ \t]*cd[ \t;]*$" string)
(cd "~"))
((string-match "^[ \t]*cd[ \t]+\\([^ \t\n;]*\\)[ \t\n;]*" string)
(cd (substring string (match-beginning 1) (match-end 1))))))
(defun inferior-octave-resync-dirs ()
"Resync the buffer's idea of the current directory.
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