[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7631: 24.0.50; inconsistency in event-convert-list and event-basic-t
From: |
Stefan Monnier |
Subject: |
bug#7631: 24.0.50; inconsistency in event-convert-list and event-basic-type |
Date: |
Sun, 18 Jul 2021 12:09:43 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Don March wrote:
> (event-convert-list
> (append (event-modifiers event)
> (list (event-basic-type event)))) ; => 116, not t
>
> In my mind, this should be an identity function (in the mathematical
> sense) for events;
In general, it literally can't be: there are several "equivalent"
representations of a given event and `event-convert-list` should return
a "canonical" version. E.g. it should return `C-M-return` when `event`
is `M-C-return`.
There is no "canonical event" `t`, instead Emacs uses `?t` as the
canonical event for hitting the key `t`.
Lars wrote:
> So if this isn't a bug (and I think it would be problematic to change
> the return value at this point), the doc string is at least slightly
> misleading here, and shouldn't claim that it returns exactly the same
> base event type.
Fair enough,
Stefan