[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108141: IDO: Disable match re-ord
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108141: IDO: Disable match re-ordering for buffer switching |
Date: |
Mon, 17 Sep 2012 06:23:49 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108141
fixes bug: http://debbugs.gnu.org/2042
committer: Leo Liu <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-09-17 06:23:49 +0800
message:
IDO: Disable match re-ordering for buffer switching
modified:
lisp/ChangeLog
lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-12 08:04:10 +0000
+++ b/lisp/ChangeLog 2012-09-16 22:23:49 +0000
@@ -1,3 +1,9 @@
+2012-09-16 Leo Liu <address@hidden>
+
+ IDO: Disable match re-ordering for buffer switching.
+ * ido.el (ido-confirm-unique-completion): New variable.
+ (ido-set-matches-1): Use it. (Bug#2042)
+
2012-09-12 Jose Marino <address@hidden> (tiny change)
* progmodes/idlw-shell.el (idlwave-shell-complete-filename):
=== modified file 'lisp/ido.el'
--- a/lisp/ido.el 2012-04-04 16:22:09 +0000
+++ b/lisp/ido.el 2012-09-16 22:23:49 +0000
@@ -493,6 +493,17 @@
:type 'boolean
:group 'ido)
+;; See http://debbugs.gnu.org/2042 for more info.
+(defcustom ido-buffer-disable-smart-matches t
+ "Non-nil means not to re-order matches for buffer switching.
+By default, ido aranges matches in the following order:
+
+ full-matches > suffix matches > prefix matches > remaining matches
+
+which can get in the way for buffer switching."
+ :type 'boolean
+ :group 'ido)
+
(defcustom ido-confirm-unique-completion nil
"Non-nil means that even a unique completion must be confirmed.
This means that \\[ido-complete] must always be followed by
\\[ido-exit-minibuffer]
@@ -3688,10 +3699,17 @@
(rex0 (if ido-enable-regexp text (regexp-quote text)))
(rexq (concat rex0 (if slash ".*/" "")))
(re (if ido-enable-prefix (concat "\\`" rexq) rexq))
- (full-re (and do-full (not ido-enable-regexp) (not (string-match
"\$\\'" rex0))
+ (full-re (and do-full
+ (and (eq ido-cur-item 'buffer)
+ (not ido-buffer-disable-smart-matches))
+ (not ido-enable-regexp)
+ (not (string-match "\$\\'" rex0))
(concat "\\`" rex0 (if slash "/" "") "\\'")))
(suffix-re (and do-full slash
- (not ido-enable-regexp) (not (string-match "\$\\'"
rex0))
+ (and (eq ido-cur-item 'buffer)
+ (not ido-buffer-disable-smart-matches))
+ (not ido-enable-regexp)
+ (not (string-match "\$\\'" rex0))
(concat rex0 "/\\'")))
(prefix-re (and full-re (not ido-enable-prefix)
(concat "\\`" rexq)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108141: IDO: Disable match re-ordering for buffer switching,
Leo Liu <=