From: Gregory Heytings <gregory@heytings.org>
To: 47699@debbugs.gnu.org
Subject: bug#47699: [PATCH] Improve completion-list-mode-map
Date: Sun, 11 Apr 2021 01:03:56 +0000 [thread overview]
Message-ID: <3755fe92dcbf588701ae@heytings.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
Currently completion-list-mode-map does not give a specific meaning to
most keys, which means that most keypresses display an error "Buffer is
read-only #<buffer *Completions*>". I suggest to make it a child of
special-mode-map, and to bind the "n" and "p" keys to "next-completion"
and "previous-completion".
Patch attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=0001-Improve-completion-list-mode-map.patch, Size: 1315 bytes --]
From 53dd1bcb56e743452f5bb825f46c60ed19ae72d1 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Sun, 11 Apr 2021 00:53:54 +0000
Subject: [PATCH] Improve completion-list-mode-map
* lisp/simple.el (completion-list-mode-map): Make special-mode-map its
parent, unbind the 'g' revert key, add the 'n' and 'p' keys for
next-completion and previous-completion.
---
lisp/simple.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/simple.el b/lisp/simple.el
index 999755a642..82ac6fc6b3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8767,6 +8767,8 @@ makes it easier to edit it."
(defvar completion-list-mode-map
(let ((map (make-sparse-keymap)))
+ (set-keymap-parent map special-mode-map)
+ (define-key map "g" nil) ;; nothing to revert
(define-key map [mouse-2] 'choose-completion)
(define-key map [follow-link] 'mouse-face)
(define-key map [down-mouse-2] nil)
@@ -8778,6 +8780,8 @@ makes it easier to edit it."
(define-key map [backtab] 'previous-completion)
(define-key map "q" 'quit-window)
(define-key map "z" 'kill-current-buffer)
+ (define-key map "n" 'next-completion)
+ (define-key map "p" 'previous-completion)
map)
"Local map for completion list buffers.")
--
2.30.2
next reply other threads:[~2021-04-11 1:03 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 1:03 Gregory Heytings [this message]
2021-04-11 7:24 ` bug#47699: [PATCH] Improve completion-list-mode-map Eli Zaretskii
2021-04-11 7:31 ` Eli Zaretskii
2021-04-11 7:58 ` Gregory Heytings
2021-04-11 8:14 ` Eli Zaretskii
2021-04-11 8:31 ` Gregory Heytings
2021-04-11 8:34 ` Eli Zaretskii
2021-04-11 10:14 ` Gregory Heytings
2021-04-11 10:40 ` Eli Zaretskii
2021-04-11 10:50 ` Gregory Heytings
2021-04-11 13:31 ` Eli Zaretskii
2021-04-11 18:30 ` Gregory Heytings
2021-04-11 18:46 ` Eli Zaretskii
2021-04-11 19:13 ` Gregory Heytings
2021-04-11 19:37 ` Eli Zaretskii
2021-04-11 20:44 ` Gregory Heytings
2021-04-12 7:24 ` Gregory Heytings
2021-04-11 18:59 ` bug#47699: [External] : " Drew Adams
2021-04-11 19:21 ` Gregory Heytings
2021-04-11 22:33 ` Drew Adams
2021-04-12 6:49 ` Gregory Heytings
2021-04-12 14:50 ` Drew Adams
2021-05-25 4:39 ` Lars Ingebrigtsen
2021-05-25 7:32 ` Gregory Heytings
2021-05-25 7:37 ` Lars Ingebrigtsen
2021-05-25 8:34 ` Gregory Heytings
2021-05-25 8:40 ` Lars Ingebrigtsen
2021-05-25 8:42 ` Gregory Heytings
2021-05-25 12:31 ` Basil L. Contovounesios
2021-05-25 19:22 ` Lars Ingebrigtsen
2021-05-25 19:25 ` Gregory Heytings
2021-05-25 19:27 ` Gregory Heytings
2021-04-11 22:36 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3755fe92dcbf588701ae@heytings.org \
--to=gregory@heytings.org \
--cc=47699@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).