diff options
| author | Leo Liu | 2013-07-09 13:09:45 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-07-09 13:09:45 +0800 |
| commit | c28b9050d55c19317cfab3ff5f9d0cf749ef1ac2 (patch) | |
| tree | 06d8d682785fda6631e4c887882983b641c3d3b5 | |
| parent | cf7a0de6e75d2c510e69ab77bc70279cba7c48ba (diff) | |
| download | emacs-c28b9050d55c19317cfab3ff5f9d0cf749ef1ac2.tar.gz emacs-c28b9050d55c19317cfab3ff5f9d0cf749ef1ac2.zip | |
* ido.el (ido-add-virtual-buffers-to-list): Robustify. (Bug#14552)
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/ido.el | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 562f4739f80..83f824edef0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | * ido.el (ido-read-directory-name): Handle fallback. | 3 | * ido.el (ido-read-directory-name): Handle fallback. |
| 4 | (ido-read-file-name): Update DIR to ido-current-directory. | 4 | (ido-read-file-name): Update DIR to ido-current-directory. |
| 5 | (Bug#1516) | 5 | (Bug#1516) |
| 6 | (ido-add-virtual-buffers-to-list): Robustify. (Bug#14552) | ||
| 6 | 7 | ||
| 7 | 2013-07-09 Dmitry Gutov <dgutov@yandex.ru> | 8 | 2013-07-09 Dmitry Gutov <dgutov@yandex.ru> |
| 8 | 9 | ||
diff --git a/lisp/ido.el b/lisp/ido.el index 12af1952cce..22c8a4e65be 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -3461,8 +3461,14 @@ This is to make them appear as if they were \"virtual buffers\"." | |||
| 3461 | (setq ido-virtual-buffers nil) | 3461 | (setq ido-virtual-buffers nil) |
| 3462 | (let (name) | 3462 | (let (name) |
| 3463 | (dolist (head recentf-list) | 3463 | (dolist (head recentf-list) |
| 3464 | (and (setq name (file-name-nondirectory head)) | 3464 | (setq name (file-name-nondirectory head)) |
| 3465 | (null (get-file-buffer head)) | 3465 | ;; In case HEAD is a directory with trailing /. See bug#14552. |
| 3466 | (when (equal name "") | ||
| 3467 | (setq name (file-name-nondirectory (directory-file-name head)))) | ||
| 3468 | (when (equal name "") | ||
| 3469 | (setq name head)) | ||
| 3470 | (and (not (equal name "")) | ||
| 3471 | (null (get-file-buffer head)) | ||
| 3466 | (not (assoc name ido-virtual-buffers)) | 3472 | (not (assoc name ido-virtual-buffers)) |
| 3467 | (not (member name ido-temp-list)) | 3473 | (not (member name ido-temp-list)) |
| 3468 | (not (ido-ignore-item-p name ido-ignore-buffers)) | 3474 | (not (ido-ignore-item-p name ido-ignore-buffers)) |