summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2003-06-06 17:39:46 +0000
committerJuanma Barranquero <lekktu@gmail.com>2003-06-06 17:39:46 +0000
commit87a1fe1d6824d242f79a08cb65135d8b1c993504 (patch)
tree24cac0217ec274d1fe538a96f0e4d9ee5b071955 /lisp
parent0defe75805f89ac3e918bba5e2ebd64e15b93ed6 (diff)
downloademacs-87a1fe1d6824d242f79a08cb65135d8b1c993504.tar.gz
emacs-87a1fe1d6824d242f79a08cb65135d8b1c993504.tar.bz2
emacs-87a1fe1d6824d242f79a08cb65135d8b1c993504.zip
(shell-resync-dirs): Tolerate an extra line of output before the list of
directories from `shell-dirstack-query' (it looks for, and ignores, a literal copy of the value of shell-dirstack-query).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/shell.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 154c4ff46eb..9905fde3712 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -791,12 +791,16 @@ command again."
(let ((pt (point))) ; wait for 1 line
;; This extra newline prevents the user's pending input from spoofing us.
(insert "\n") (backward-char 1)
- (while (not (looking-at ".+\n"))
+ (while (not (looking-at
+ (concat "\\(" ; skip literal echo in case of stty echo
+ (regexp-quote shell-dirstack-query)
+ "\n\\)?" ; skip if present
+ "\\(" ".+\n" "\\)")) ) ; what to actually look for
(accept-process-output proc)
(goto-char pt)))
(goto-char pmark) (delete-char 1) ; remove the extra newline
;; That's the dirlist. grab it & parse it.
- (let* ((dl (buffer-substring (match-beginning 0) (1- (match-end 0))))
+ (let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2))))
(dl-len (length dl))
(ds '()) ; new dir stack
(i 0))