[Top][All Lists]

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

Re: Moving kbd to subr.el

From: Gregory Heytings
Subject: Re: Moving kbd to subr.el
Date: Mon, 18 Oct 2021 12:46:41 +0000

Anyway, it seems like we (more or less) have a complete list of all symbols that are possible, but there's no way to ask Emacs "is this a valid lispy event name?" And it depends on the OS -- so we can't really create a function based on the lispy_ C arrays either, because it'd be annoying to get errors (or warnings) on different systems.

And as Eli just said, Emacs (or an Emacs package) could invent new symbolic names for events at any time.

But it does seem true that none of our events start with a number, or a dash, or an underscore.

Indeed. We were working on this in parallel, so just in case, I attach the last version of my patch, which performs I think a more thorough check of the key binding string.

BTW, I think something was still unclear in my proposal. I was not suggesting to use, in the long term, strings for both the kbd syntax and for strings where every char represents an event. What I was suggesting is to allow both syntaxes for one Emacs release, and to deprecate the "strings where every char represents an event" in the next Emacs release (or possibly to create a specific notation for them if removing them is not possible). IOW, the long term situation would be unambiguous. Do you really think that it's better, in the long term, to see

(define-key ... ["C-a"] ...)

everywhere (or almost everywhere), instead of

(define-key ... "C-a" ...)


Attachment: Make-it-possible-to-use-the-kbd-key-binding-syntax-i.patch
Description: Text Data

reply via email to

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