Enable ido to kill virtual buffers
This commit is contained in:
parent
f8fc0578a8
commit
5c90fde028
2 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-04-11 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* ido.el (ido-buffer-internal): Allow method 'kill for virtual
|
||||
buffers.
|
||||
(ido-kill-buffer-at-head): Support killing virtual buffers.
|
||||
|
||||
2011-04-10 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* minibuffer.el (completion-show-inline-help): New var.
|
||||
|
|
18
lisp/ido.el
18
lisp/ido.el
|
@ -2176,9 +2176,7 @@ If cursor is not at the end of the user input, move to end of input."
|
|||
(ido-current-directory nil)
|
||||
(ido-directory-nonreadable nil)
|
||||
(ido-directory-too-big nil)
|
||||
(ido-use-virtual-buffers (if (eq method 'kill)
|
||||
nil ;; Don't consider virtual buffers for killing
|
||||
ido-use-virtual-buffers))
|
||||
(ido-use-virtual-buffers ido-use-virtual-buffers)
|
||||
(require-match (confirm-nonexistent-file-or-buffer))
|
||||
(buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default
|
||||
require-match initial))
|
||||
|
@ -3917,10 +3915,10 @@ 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)))
|
||||
(nextbuf (cadr ido-matches)))
|
||||
(when (get-buffer buf)
|
||||
(cond
|
||||
((get-buffer buf)
|
||||
;; If next match names a buffer use the buffer object; buffer
|
||||
;; name may be changed by packages such as uniquify; mindful
|
||||
;; of virtual buffers.
|
||||
;; name may be changed by packages such as uniquify.
|
||||
(when (and nextbuf (get-buffer nextbuf))
|
||||
(setq nextbuf (get-buffer nextbuf)))
|
||||
(if (null (kill-buffer buf))
|
||||
|
@ -3934,7 +3932,13 @@ If cursor is not at the end of the user input, delete to end of input."
|
|||
(setq ido-default-item nextbuf
|
||||
ido-text-init ido-text
|
||||
ido-exit 'refresh)
|
||||
(exit-minibuffer))))))
|
||||
(exit-minibuffer)))
|
||||
;; Handle virtual buffers
|
||||
((assoc buf ido-virtual-buffers)
|
||||
(setq recentf-list
|
||||
(delete (cdr (assoc buf ido-virtual-buffers)) recentf-list))
|
||||
(setq ido-cur-list (delete buf ido-cur-list))
|
||||
(setq ido-rescan t))))))
|
||||
|
||||
;;; DELETE CURRENT FILE
|
||||
(defun ido-delete-file-at-head ()
|
||||
|
|
Loading…
Add table
Reference in a new issue