emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#58799: Make winner key sequences repeatable in repeat-mode


From: Robert Pluim
Subject: Re: bug#58799: Make winner key sequences repeatable in repeat-mode
Date: Mon, 31 Oct 2022 16:09:54 +0100

(redirecting to emacs-devel)
>>>>> On Mon, 31 Oct 2022 07:47:36 -0700, Stefan Kangas 
>>>>> <stefankangas@gmail.com> said:

    Stefan> close 58799 29.1
    Stefan> thanks

    Stefan> Robert Pluim <rpluim@gmail.com> writes:

    >> In any case, I think we can close this particular bug.

    Stefan> Agreed.  Now done.

So the minimal change I think is this:

diff --git c/lisp/keymap.el i/lisp/keymap.el
index 107565590c..750095fab4 100644
--- c/lisp/keymap.el
+++ i/lisp/keymap.el
@@ -545,6 +545,10 @@ define-keymap
           (let ((def (pop definitions)))
             (if (eq key :menu)
                 (easy-menu-define nil keymap "" def)
+              (unless (key-valid-p key)
+                (error
+                 "Key '%s' in keymap '%s' is not `key-valid-p'"
+                 key keymap))
               (if (member key seen-keys)
                   (error "Duplicate definition for key: %S %s" key keymap)
                 (push key seen-keys))

which will give a run-time error for things like "[left]" and
'[left]', but thatʼs redundant with the compile time warning:

    make[3]: Entering directory '/home/rpluim/repos/emacs/lispʼ
      ELC      winner.elc

    In toplevel form:
    winner.el:314:15: Warning: Invalid ‘kbd’ syntax: "[left]"

Eli? Lars? Is this overkill for such a rare case?

Robert
-- 



reply via email to

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