emacs-devel
[Top][All Lists]
Advanced

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

Re: Moving kbd to subr.el


From: Lars Ingebrigtsen
Subject: Re: Moving kbd to subr.el
Date: Sun, 17 Oct 2021 21:55:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Gregory Heytings <gregory@heytings.org> writes:

> A suggestion:
>
> (kbd-valid-p "<mouse-1>")
> (kbd-valid-p "<Scroll_Lock>")
>
> should return t, and

Good point.  This does make one of the syntax checks either less
effective, or the syntax is ambiguous.  I went with the latter, but I'm
not sure that's the right thing to do here.

The kbd syntax is

"C-M-<return>"

but allowing dashes inside the brackets means that 

"<C-M-return>"

should be parsed as the key named "C-M-return" (which isn't really
possible).

So I just added some special-casing to disallow the "<C-M-return>" form
in kbd-valid-p.  We'll see... 

> (kbd-valid-p "<123>")
>
> should (I think) return nil.  IOW, kbd-valid-p should use:

I'm not sure -- can there be keys named "123"?  I don't know what the
rules are here -- is there an authoritative source for the syntax of
these names somewhere?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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