From: Robert Pluim <rpluim@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Damien Cassou <damien@cassou.me>,
Lars Ingebrigtsen <larsi@gnus.org>,
58799@debbugs.gnu.org
Subject: bug#58799: Make winner key sequences repeatable in repeat-mode
Date: Fri, 28 Oct 2022 11:36:15 +0200 [thread overview]
Message-ID: <871qqss31s.fsf@gmail.com> (raw)
In-Reply-To: <CADwFkmkhxO+aKWR5PrCqcQtGC8LFFVgKSy0OvC2JYRdn3p-tMA@mail.gmail.com> (Stefan Kangas's message of "Thu, 27 Oct 2022 09:10:12 -0700")
>>>>> On Thu, 27 Oct 2022 09:10:12 -0700, Stefan Kangas <stefankangas@gmail.com> said:
>> diff --git a/lisp/keymap.el b/lisp/keymap.el
>> index 107565590c..73a9e657fe 100644
>> --- a/lisp/keymap.el
>> +++ b/lisp/keymap.el
>> @@ -581,6 +581,10 @@ defvar-keymap
>> (setq key (pop defs))
>> (pop defs)
>> (when (not (eq key :menu))
>> + (when (not (key-valid-p key))
>> + (error
>> + "Invalid key '%s' in keymap '%s' (see `key-valid-p')"
>> + key variable-name))
>> (if (member key seen-keys)
>> (error "Duplicate definition for key '%s' in keymap '%s'"
>> key variable-name)
Stefan> LGTM.
I now think this would be a bad idea, because of the following type of
code:
(defvar-keymap footnote-minor-mode-map
:doc "Keymap used for binding footnote minor mode."
(key-description footnote-prefix) footnote-mode-map)
Thatʼs perfectly valid, but fails with the above patch unless we
1. Check (key-valid-p (eval key))
2. Add an autoload cookie for footnote-minor-mode-map
That seems too high a price to pay for avoiding the original problem.
Robert
--
next prev parent reply other threads:[~2022-10-28 9:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 15:01 bug#58799: Make winner key sequences repeatable in repeat-mode Damien Cassou
2022-10-26 19:52 ` Stefan Kangas
2022-10-27 9:04 ` Robert Pluim
2022-10-27 10:58 ` Stefan Kangas
2022-10-27 11:39 ` Robert Pluim
2022-10-27 12:31 ` Stefan Kangas
2022-10-27 13:38 ` Robert Pluim
2022-10-27 16:10 ` Stefan Kangas
2022-10-27 16:18 ` Robert Pluim
2022-10-27 16:33 ` Robert Pluim
2022-10-28 9:36 ` Robert Pluim [this message]
2022-10-28 15:41 ` Stefan Kangas
2022-10-31 14:25 ` Robert Pluim
2022-10-31 14:47 ` Stefan Kangas
2022-10-30 6:39 ` Damien Cassou
2022-10-30 12:38 ` Stefan Kangas
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=871qqss31s.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=58799@debbugs.gnu.org \
--cc=damien@cassou.me \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
/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).