diff options
| author | Kim F. Storm | 2006-12-27 02:22:36 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-12-27 02:22:36 +0000 |
| commit | 3d37467b440826accd996b98018cc2bda2405529 (patch) | |
| tree | 1090d964f03253962a8c85c2fb9f227c71483dce /lisp | |
| parent | 01baa13480a9c79fd1d8cb29afa4c048ce1dbcf8 (diff) | |
| download | emacs-3d37467b440826accd996b98018cc2bda2405529.tar.gz emacs-3d37467b440826accd996b98018cc2bda2405529.zip | |
(ido-set-matches-1): Fix last change. If default item is
current buffer, it is ok to be first.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ido.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index b398e68319d..e02028e526c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1046,6 +1046,9 @@ so that it doesn't interfere with other minibuffer usage.") | |||
| 1046 | ;; Stores the current ido item type ('file, 'dir, 'buffer, or 'list). | 1046 | ;; Stores the current ido item type ('file, 'dir, 'buffer, or 'list). |
| 1047 | (defvar ido-cur-item) | 1047 | (defvar ido-cur-item) |
| 1048 | 1048 | ||
| 1049 | ;;; Stores the current default item | ||
| 1050 | (defvar ido-default-item) | ||
| 1051 | |||
| 1049 | ;; Stores the current list of items that will be searched through. | 1052 | ;; Stores the current list of items that will be searched through. |
| 1050 | ;; The list is ordered, so that the most interesting item comes first, | 1053 | ;; The list is ordered, so that the most interesting item comes first, |
| 1051 | ;; although by default, the files visible in the current frame are put | 1054 | ;; although by default, the files visible in the current frame are put |
| @@ -3580,6 +3583,8 @@ for first matching file." | |||
| 3580 | (string-match re name)) | 3583 | (string-match re name)) |
| 3581 | (cond | 3584 | (cond |
| 3582 | ((and (eq ido-cur-item 'buffer) | 3585 | ((and (eq ido-cur-item 'buffer) |
| 3586 | (or (not (stringp ido-default-item)) | ||
| 3587 | (not (string= name ido-default-item))) | ||
| 3583 | (string= name (buffer-name ido-entry-buffer))) | 3588 | (string= name (buffer-name ido-entry-buffer))) |
| 3584 | (setq matches (cons item matches))) | 3589 | (setq matches (cons item matches))) |
| 3585 | ((and full-re (string-match full-re name)) | 3590 | ((and full-re (string-match full-re name)) |