Mercurial > emacs
changeset 51519:9933cebac174
(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).
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 06 Jun 2003 17:39:46 +0000 |
parents | 32a1c48ca0b9 |
children | f4c4d5340199 |
files | lisp/shell.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/shell.el Fri Jun 06 16:13:31 2003 +0000 +++ b/lisp/shell.el Fri Jun 06 17:39:46 2003 +0000 @@ -791,12 +791,16 @@ (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))