diff options
| author | Kim F. Storm | 2006-06-08 11:29:27 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-06-08 11:29:27 +0000 |
| commit | 11ae5e81755e27bc2b4bb9169a06c14e2bca53f9 (patch) | |
| tree | ed10409836beb35dac291264ae066e0f948577d2 | |
| parent | e819ce9e8f5e14371d086244d988ba67cfdfe1c5 (diff) | |
| download | emacs-11ae5e81755e27bc2b4bb9169a06c14e2bca53f9.tar.gz emacs-11ae5e81755e27bc2b4bb9169a06c14e2bca53f9.zip | |
(ido-read-internal): Only pop stack elements automatically if they
actually match an existing directory or file name.
| -rw-r--r-- | lisp/ido.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index 08d5c91d203..a4c26b52c98 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -2094,8 +2094,10 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2094 | (cons (cons ido-current-directory ido-selected) ido-last-directory-list))))) | 2094 | (cons (cons ido-current-directory ido-selected) ido-last-directory-list))))) |
| 2095 | (ido-set-current-directory ido-current-directory ido-selected) | 2095 | (ido-set-current-directory ido-current-directory ido-selected) |
| 2096 | (if ido-input-stack | 2096 | (if ido-input-stack |
| 2097 | (while ido-input-stack | 2097 | ; automatically pop stack elements which match existing files or directories |
| 2098 | (let ((elt (car ido-input-stack))) | 2098 | (let (elt) |
| 2099 | (while (and (setq elt (car ido-input-stack)) | ||
| 2100 | (file-exists-p (concat ido-current-directory (cdr elt)))) | ||
| 2099 | (if (setq ido-input-stack (cdr ido-input-stack)) | 2101 | (if (setq ido-input-stack (cdr ido-input-stack)) |
| 2100 | (ido-set-current-directory ido-current-directory (cdr elt)) | 2102 | (ido-set-current-directory ido-current-directory (cdr elt)) |
| 2101 | (setq ido-text-init (cdr elt))) | 2103 | (setq ido-text-init (cdr elt))) |