[Top][All Lists]

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

RE: [External] : Re: Moving kbd to subr.el

From: Drew Adams
Subject: RE: [External] : Re: Moving kbd to subr.el
Date: Tue, 19 Oct 2021 18:06:14 +0000

> * _Emacs_ doesn't write "return" for what...  It
>   writes "<return>".  And kbd returns [return].
> It's about how _Emacs_ itself talks to users about
> keys - the names/descriptions it gives them in its
> Help. Users of `kbd' can talk to Emacs in the same
> terms that Emacs talks to them about keys.

BTW (related, but maybe OT, depending on how
"free-range" this thread really is):

It's entirely possible to do without the use of
angle brackets in Emacs key descriptions.  I've
mentioned this before (more than once, likely).

I do that in my library `naked.el'.  Function
`naked' is `kbd', with the option of not bothering
with angle brackets.  More precisely, by default
it expects not angle brackets, but with an optional
arg it behaves exactly like `kbd'.

`naked' doc string:

 Like `kbd', but does not use angle brackets, by default.
 With non-nil optional arg ANGLES, expect key descriptions
 to use angle brackets (<...>), exactly like `kbd'.
 Otherwise, expect key descriptions not to use angle brackets.
 For example:

  (naked "mode-line")     returns [mode-line]
  (naked "<mode-line>" t) returns [mode-line]

 The default behavior lets you use, e.g., "C-x delete" and
 "C-delete" instead of "C-x <delete>" and "C-<delete>".



reply via email to

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