[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Fix IDO interaction with uniquify.el

From: Leo
Subject: Re: PATCH: Fix IDO interaction with uniquify.el
Date: Wed, 05 May 2010 09:27:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On 2010-01-18 19:17 +0000, Juanma Barranquero wrote:
> On Mon, Jan 18, 2010 at 19:06, Chong Yidong <address@hidden> wrote:
>> Looks OK to me.  I don't use ido, however, so could someone who does
>> (and has commit access) check that it behaves correctly, and if so
>> commit it?
> I use ido. In my not-that-extensive testing, it works as expected and
> fixes the bug. I'll commit it.
>     Juanma

I confirm the original bug report. I propose here a different fix for
both ido and iswitch. It is much simpler and more efficient.
(buffer-list) can be a large list given the new feature virtual buffers
in both iswitch and ido modes.


>From 4faddfd77236de485d77eece0eb7b655e85d9cdf Mon Sep 17 00:00:00 2001
From: Leo <address@hidden>
Date: Wed, 5 May 2010 09:19:59 +0100
Subject: [PATCH] Stop uniquify from interfering with iswitch and ido when 
killing buffers

 lisp/ido.el      |    3 ++-
 lisp/iswitchb.el |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/ido.el b/lisp/ido.el
index 7cdeb70..9d0cb40 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3965,7 +3965,8 @@ If cursor is not at the end of the user input, delete to 
end of input."
     (let ((enable-recursive-minibuffers t)
          (buf (ido-name (car ido-matches))))
       (when buf
-       (kill-buffer buf)
+       ;; stop uniquify from renaming buffers
+       (let (uniquify-buffer-name-style) (kill-buffer buf))
        ;; Check if buffer still exists.
        (if (get-buffer buf)
            ;; buffer couldn't be killed.
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index ea4b00d..333eeee 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1034,7 +1034,8 @@ Return the modified list with the last element prepended 
to it."
     ;; check to see if buf is non-nil.
     (if buf
-         (kill-buffer buf)
+         ;; stop uniquify from renaming buffers
+         (let (uniquify-buffer-name-style) (kill-buffer buf))
          ;; Check if buffer exists.  XEmacs gnuserv.el makes alias
          ;; for kill-buffer which does not return t if buffer is

reply via email to

[Prev in Thread] Current Thread [Next in Thread]