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: Thu, 21 Oct 2021 06:37:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas <stefankangas@gmail.com> writes:

> But let's say we were to promote `kbd-*' mainly for use in Emacs and
> packages, and that we drop support for string syntax there (only
> allowing instead e.g. the XEmacs [(control meta x)] syntax).  And let's
> say we coupled this with promoting e.g. `bind-key' as the strictly
> user-facing way to bind keys.  In this case, perhaps the balance would
> be different.
>
> For example, do we need to demand "C-<return>" instead of "C-return" in
> our strictly user-facing function?  Maybe not.  But we should IMO
> definitely demand that if you want to bind a command to the six
> character sequence, you need to specify that as "r e t u r n".

I don't see much value in allowing either the XEmacs syntax nor a sloppy
kbd syntax here.  I do see value in having the syntax be exactly the
same as `describe-key' outputs -- then the user knows that they can
round-trip these things from `kbd-bind' to seeing it in *Help* in
exactly the same form.

You (kbd-local-bind "C-<return>") and then you hit `C-h b' and see
C-<return> in the *Help* buffer and all is well with the world, and
there's nothing mysterious going on.

-- 
(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]