emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggestions for improvements to the *Completions* buffer


From: Philip Kaludercic
Subject: Re: Suggestions for improvements to the *Completions* buffer
Date: Fri, 17 Dec 2021 15:00:34 +0000

Philip Kaludercic <philipk@posteo.net> writes:

>> Then "z" could be bound to a variant of `quit-window'
>> that calls it with the argument KILL non-nil.
>
> So something like this?

I inserted the wrong patch, here.  It was supposed to be

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/simple.el b/lisp/simple.el
index a55df604c1..1521c325dc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8967,7 +8967,8 @@ completion-quit
 (defun completion-kill-buffer ()
   "Close the completion buffer and return to the minibuffer."
   (interactive)
-  (kill-buffer "*Completions*")
+  (let ((win (get-buffer-window "*Completions*")))
+    (when win (quit-window t win)))
   (switch-to-minibuffer))
 
 (defvar completion-list-mode-map
--8<---------------cut here---------------end--------------->8---

-- 
        Philip Kaludercic



reply via email to

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