emacs-devel
[Top][All Lists]
Advanced

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

Re: master 3b41141708: Expose the name of an event's input device to Lis


From: Stefan Monnier
Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp
Date: Sat, 09 Apr 2022 10:20:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> But I agree that the current representation of events is problematic.
>> We should make it more regular and self-descriptive, either based on an
>> alist as above or have every event come with some kind of "class" which
>> then describes the name&position of every accompanying data.
> Unfortunately, our current representation is basically set in stone.

To some extent, yes, but we can try and design the new representation to
be compatible with the old one.  E.g. the "class" could be obtained via:

    (defun event-class (e)
      (if (consp e)
          (get (event-basic-type e) 'event-class)
        character-event-class))

> There is too much Lisp out there that relies on the current form of Lisp
> events, and simply finding all that code will be a serious chore.

Yup, that's why we have to introduce the new API in a way that's
backward compatible.

> Maybe we could introduce a new representation of event in addition to
> the current form, with a its own interactive form and read-event, that
> represents events as some better data structure?

Here, I'd side with Eli and say that the resulting code churn wojuld be
more trouble than it's worth.
[ Most of that work has already been done in the context of
  XEmacs, but I doubt we'd be able to make use of it, sadly.  ]


        Stefan




reply via email to

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