Mercurial > emacs
comparison lisp/progmodes/octave-inf.el @ 20401:1ed464f56e6e
(inferior-octave-directory-tracker):
Anchor regexp match to beginning of command string.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 04 Dec 1997 04:39:00 +0000 |
parents | 0457d32c5b05 |
children | 6f55b3849106 |
comparison
equal
deleted
inserted
replaced
20400:fd74979309d3 | 20401:1ed464f56e6e |
---|---|
334 (set-process-filter proc filter)))) | 334 (set-process-filter proc filter)))) |
335 | 335 |
336 (defun inferior-octave-directory-tracker (string) | 336 (defun inferior-octave-directory-tracker (string) |
337 "Tracks `cd' commands issued to the inferior Octave process. | 337 "Tracks `cd' commands issued to the inferior Octave process. |
338 Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused." | 338 Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused." |
339 (if (string-match "[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]" | 339 (if (string-match "^[ \t]*cd[ \t]*\\([^ \t\n;]*\\)[ \t\n;]" |
340 string) | 340 string) |
341 (cd (substring string (match-beginning 1) (match-end 1))))) | 341 (cd (substring string (match-beginning 1) (match-end 1))))) |
342 | 342 |
343 (defun inferior-octave-resync-dirs () | 343 (defun inferior-octave-resync-dirs () |
344 "Resync the buffer's idea of the current directory. | 344 "Resync the buffer's idea of the current directory. |