Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- a/lisp/ido.el Wed Dec 27 02:22:24 2006 +0000 +++ b/lisp/ido.el Wed Dec 27 02:22:36 2006 +0000 @@ -1046,6 +1046,9 @@ ;; Stores the current ido item type ('file, 'dir, 'buffer, or 'list). (defvar ido-cur-item) +;;; Stores the current default item +(defvar ido-default-item) + ;; Stores the current list of items that will be searched through. ;; The list is ordered, so that the most interesting item comes first, ;; although by default, the files visible in the current frame are put @@ -3580,6 +3583,8 @@ (string-match re name)) (cond ((and (eq ido-cur-item 'buffer) + (or (not (stringp ido-default-item)) + (not (string= name ido-default-item))) (string= name (buffer-name ido-entry-buffer))) (setq matches (cons item matches))) ((and full-re (string-match full-re name))