summaryrefslogtreecommitdiff
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorDario Gjorgjevski <dario.gjorgjevski+git@gmail.com>2020-08-15 12:33:37 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-15 12:33:43 +0200
commit5b463af8dda4d66bb63a7ce58177e83a42541bac (patch)
tree10af0c83a912a99ee69dc45e069c89ebeef9ecc3 /lisp/ido.el
parent83000ae6d7c6e3c615b16d2ea9274e1088d24178 (diff)
downloademacs-5b463af8dda4d66bb63a7ce58177e83a42541bac.tar.gz
Tweak how ido handles killing virtual buffers
* lisp/ido.el (ido-buffer-internal): Handle killing of virtual buffers as a special case. (ido-visit-buffer): Document the special case (bug#38294).
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index e834916a6da..ad7500c0a1e 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -2216,7 +2216,10 @@ If cursor is not at the end of the user input, move to end of input."
((and ido-enable-virtual-buffers
ido-virtual-buffers
(setq filename (assoc buf ido-virtual-buffers)))
- (ido-visit-buffer (find-file-noselect (cdr filename)) method t))
+ (if (eq method 'kill)
+ (setq recentf-list
+ (delete (cdr filename) recentf-list))
+ (ido-visit-buffer (find-file-noselect (cdr filename)) method t)))
((and (eq ido-create-new-buffer 'prompt)
(null require-match)
@@ -4073,6 +4076,7 @@ Record command in `command-history' if optional RECORD is non-nil."
(setq buffer (buffer-name buffer)))
(let (win newframe)
(cond
+ ;; "Killing" of virtual buffers is handled in `ido-buffer-internal'.
((eq method 'kill)
(if record
(ido-record-command 'kill-buffer buffer))