From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#58799: Make winner key sequences repeatable in repeat-mode Date: Mon, 31 Oct 2022 17:28:18 +0200 Message-ID: <83o7tsdncd.fsf@gnu.org> References: <87y1t2zl1s.fsf@cassou.me> <87fsf9vdr6.fsf@gmail.com> <87v8o5ts06.fsf@gmail.com> <87lep1tmie.fsf@gmail.com> <871qqss31s.fsf@gmail.com> <87a65coytd.fsf@gmail.com> <87wn8gni65.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24520"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, larsi@gnus.org, emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 31 16:30:03 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opWjj-0006Fo-3J for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Oct 2022 16:30:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opWiM-0001ze-3U; Mon, 31 Oct 2022 11:28:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opWiI-0001yV-SI for emacs-devel@gnu.org; Mon, 31 Oct 2022 11:28:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opWiI-0008Sy-IH; Mon, 31 Oct 2022 11:28:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=pmbkpGzTuoEpBLOkXlkxkEsg/RogMMPY4U2yQmC0Dw0=; b=UKj56QRWtGyt4ASHZNnE kKyRAOJyWG87XXuh+BPjUwcSwYmdMQVUO76YHlmKPs8YzKZNvUWqVHpUFf0PCV6cOE8HwCNHhDcZ3 WkX4SDZJys0tuX6xkqVGf1Mi+XLxdvEEJdUSSMnVcH7qxFJhg24PpTpYrHhbNNVChBGgWqkJoH6SH V6O9MXfEi8QZMh9V8qNvCO1dTmCtwY86DmlIcEsjvQbIjiffnbav6yidkYwM0XG+/AU8CS3h88CO/ 1zNkhfqU54ihFxnpcSik3zF9/Y6N3eGSp8fUFKNEA9guwFVX4S4mqKoos5vXVH2tK26jP1BaQdfY3 JeEdLb5et3UdwQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opWiI-0002hO-0V; Mon, 31 Oct 2022 11:28:34 -0400 In-Reply-To: <87wn8gni65.fsf@gmail.com> (message from Robert Pluim on Mon, 31 Oct 2022 16:09:54 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298864 Archived-At: > From: Robert Pluim > Cc: Lars Ingebrigtsen , 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.