Mercurial > emacs
changeset 71275:aa026ce4fcef
(ido-read-internal): Only pop stack elements automatically if they
actually match an existing directory or file name.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 08 Jun 2006 11:29:27 +0000 |
parents | 9c646f1ba2df |
children | 3e72da0c198d |
files | lisp/ido.el |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ido.el Thu Jun 08 11:29:14 2006 +0000 +++ b/lisp/ido.el Thu Jun 08 11:29:27 2006 +0000 @@ -2094,8 +2094,10 @@ (cons (cons ido-current-directory ido-selected) ido-last-directory-list))))) (ido-set-current-directory ido-current-directory ido-selected) (if ido-input-stack - (while ido-input-stack - (let ((elt (car ido-input-stack))) + ; automatically pop stack elements which match existing files or directories + (let (elt) + (while (and (setq elt (car ido-input-stack)) + (file-exists-p (concat ido-current-directory (cdr elt)))) (if (setq ido-input-stack (cdr ido-input-stack)) (ido-set-current-directory ido-current-directory (cdr elt)) (setq ido-text-init (cdr elt)))