emacs-devel
[Top][All Lists]
Advanced

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

Making it easier to get rid of *Completions*


From: Daniel Colascione
Subject: Making it easier to get rid of *Completions*
Date: Sat, 29 Mar 2014 20:42:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

When I'm using completion-at-point (and completion-in-region-mode more
generally), I find that I always have a *Completions* buffer that stick
around when I don't want it. *Completions* is supposed to go away during
the course of normal editing as the completions it contains become
obsolete, but sometimes it doesn't --- imagine moving back to the prompt
after completing a command in comint.

The following patch makes C-g in the regular command loop exit
completion-in-region-mode, getting rid of the *Completions* buffer. It
seems like it's doing a decent job so far. This patch also makes it
easier to work with a two-window Emacs: otherwise, C-x o

Comments? Better ways to make *Completions* less annoying in stock Emacs?

=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el  2014-03-05 07:04:01 +0000
+++ lisp/minibuffer.el  2014-03-30 03:39:32 +0000
@@ -1928,6 +1928,7 @@
       (and completion-in-region--data
            (and (eq (marker-buffer (nth 0 completion-in-region--data))
                     (current-buffer))
+                (not (eq this-command 'keyboard-quit))
                 (>= (point) (nth 0 completion-in-region--data))
                 (<= (point)
                     (save-excursion


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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