Mercurial > emacs
comparison lisp/ido.el @ 74930:2de62cd68677
(ido-set-matches-1): Fix last change. If default item is
current buffer, it is ok to be first.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 27 Dec 2006 02:22:36 +0000 |
parents | d2cfe143b802 |
children | e3694f1cb928 bc10a33dd40b |
comparison
equal
deleted
inserted
replaced
74929:d70e2274fe20 | 74930:2de62cd68677 |
---|---|
1043 ;;; Variables with dynamic bindings. | 1043 ;;; Variables with dynamic bindings. |
1044 ;;; Declared here to keep the byte compiler quiet. | 1044 ;;; Declared here to keep the byte compiler quiet. |
1045 | 1045 |
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 | |
1049 ;;; Stores the current default item | |
1050 (defvar ido-default-item) | |
1048 | 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 |
1052 ;; at the end of the list. Created by `ido-make-item-list'. | 1055 ;; at the end of the list. Created by `ido-make-item-list'. |
3578 (= (aref name 0) ?.) | 3581 (= (aref name 0) ?.) |
3579 (/= (aref name 0) ?.))) | 3582 (/= (aref name 0) ?.))) |
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)) |
3586 (setq full-matches (cons item full-matches))) | 3591 (setq full-matches (cons item full-matches))) |
3587 ((and suffix-re (string-match suffix-re name)) | 3592 ((and suffix-re (string-match suffix-re name)) |