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: Fri, 15 Oct 2021 16:04:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> As for what this intends to do, I think it tries to use a string even
> in the case where some of the events use the `meta` modifier, and it
> does this by relying on the following bit of code in `define-key`:
>
>     int meta_bit = (VECTORP (key) || (STRINGP (key) && STRING_MULTIBYTE (key))
>                     ? meta_modifier : 0x80);
>
> I.e. when a string is used to represent a sequence of events, that string
> can include meta modifiers (represented as the 7th bit) but only if the
> string is unibyte.
>
> It's for those kinds of intricacies that I want to get rid of the use of
> strings as sequences of events.

Yeah, it's definitely an area riddled with legacy intricacies.

But at this time, I think we should retain the way `kbd' works right
now, and not try to make it output "\M-s" strings again (which it
presumably did at one time).  It most likely stopped doing that a couple
of decades ago, and nobody noticed -- which is nice, because it probably
means that we (at some point in the future) can drop the string
representation altogether (as a return value from `kbd').

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