emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: ido-mode and customized read-buffer-function


From: Kim F. Storm
Subject: Re: ido-mode and customized read-buffer-function
Date: Wed, 27 Apr 2005 10:41:41 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Roland Winkler <address@hidden> writes:

> On Sun Apr 24 2005 Kim F. Storm wrote:
>> Roland Winkler <address@hidden> writes:
>> 
>> >> Does this patch give good results ?
>> >
>> > Thanks a lot for the quick reply. I think there is a minor bug
>> > (see below).
>> 
>> You are right.  Thanks.  I installed the change.
>
> I thought I tested all possibilities. But maybe I didn't.

Does this patch give better results?

*** ido.el      24 Apr 2005 21:06:21 +0200      1.52
--- ido.el      27 Apr 2005 10:34:42 +0200      
***************
*** 1347,1365 ****
                           (> (prefix-numeric-value arg) 0)
                         (not ido-everywhere)))
    (when (get 'ido-everywhere 'file)
!     (setq read-file-name-function (get 'ido-everywhere 'file))
      (put 'ido-everywhere 'file nil))
    (when (get 'ido-everywhere 'buffer)
!     (setq read-buffer-function (get 'ido-everywhere 'buffer))
      (put 'ido-everywhere 'buffer nil))
    (when ido-everywhere
      (when (memq ido-mode '(both file))
!       (unless (get 'ido-everywhere 'file)
!       (put 'ido-everywhere 'file read-file-name-function))
        (setq read-file-name-function 'ido-read-file-name))
      (when (memq ido-mode '(both buffer))
!       (unless (get 'ido-everywhere 'buffer)
!       (put 'ido-everywhere 'buffer read-buffer-function))
        (setq read-buffer-function 'ido-read-buffer))))
  
  
--- 1347,1363 ----
                           (> (prefix-numeric-value arg) 0)
                         (not ido-everywhere)))
    (when (get 'ido-everywhere 'file)
!     (setq read-file-name-function (car (get 'ido-everywhere 'file)))
      (put 'ido-everywhere 'file nil))
    (when (get 'ido-everywhere 'buffer)
!     (setq read-buffer-function (car (get 'ido-everywhere 'buffer)))
      (put 'ido-everywhere 'buffer nil))
    (when ido-everywhere
      (when (memq ido-mode '(both file))
!       (put 'ido-everywhere 'file (cons read-file-name-function nil))
        (setq read-file-name-function 'ido-read-file-name))
      (when (memq ido-mode '(both buffer))
!       (put 'ido-everywhere 'buffer (cons read-buffer-function nil))
        (setq read-buffer-function 'ido-read-buffer))))
  
  

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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