unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: stefankangas@gmail.com, larsi@gnus.org, emacs-devel@gnu.org
Subject: Re: bug#58799: Make winner key sequences repeatable in repeat-mode
Date: Mon, 31 Oct 2022 17:28:18 +0200	[thread overview]
Message-ID: <83o7tsdncd.fsf@gnu.org> (raw)
In-Reply-To: <87wn8gni65.fsf@gmail.com> (message from Robert Pluim on Mon, 31 Oct 2022 16:09:54 +0100)

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,  emacs-devel@gnu.org
> Date: Mon, 31 Oct 2022 16:09:54 +0100
> 
> 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?

I don't know.  I guess it depends on how many people will be tripped
by this.  The change itself is small enough, I think.



  reply	other threads:[~2022-10-31 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87y1t2zl1s.fsf@cassou.me>
     [not found] ` <CADwFkmmdOfeQ5ewESoZbXk6g=gXQGu9RBx=DjwUv1Mv74saTOw@mail.gmail.com>
     [not found]   ` <87fsf9vdr6.fsf@gmail.com>
     [not found]     ` <CADwFkmmR-dGnudqdMx=Sa6kC-5Xfi8fg8tr0jX232gMXJeNz0g@mail.gmail.com>
     [not found]       ` <87v8o5ts06.fsf@gmail.com>
     [not found]         ` <CADwFkmk63iJ-eg0xLKGSo3s_pMQNk7BxoaMS1xfrO9ez8+Cn1w@mail.gmail.com>
     [not found]           ` <87lep1tmie.fsf@gmail.com>
     [not found]             ` <CADwFkmkhxO+aKWR5PrCqcQtGC8LFFVgKSy0OvC2JYRdn3p-tMA@mail.gmail.com>
     [not found]               ` <871qqss31s.fsf@gmail.com>
     [not found]                 ` <CADwFkm=ws9xrL70khgjT4K_uqSBRgbb+GRY=PBfWX8YeOhgTMQ@mail.gmail.com>
     [not found]                   ` <87a65coytd.fsf@gmail.com>
     [not found]                     ` <CADwFkmmftfd1=qkM-tMorNWh2F5KsoQtKiqpKwB0tre1g_UJTg@mail.gmail.com>
2022-10-31 15:09                       ` bug#58799: Make winner key sequences repeatable in repeat-mode Robert Pluim
2022-10-31 15:28                         ` Eli Zaretskii [this message]
2022-10-31 15:42                           ` Robert Pluim

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=83o7tsdncd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=rpluim@gmail.com \
    --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).