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: Po Lu
Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp
Date: Sun, 10 Apr 2022 08:56:38 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 09 Apr 2022 21:37:56 +0800
>> 
>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> 
>> > Not necessarily, it could be something like:
>> >
>> >     (defun event-device (e)
>> >       (when (consp e)
>> >         (alist-get 'device (nthcdr 3 e))))
>> >
>> > 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.
>> 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.
>
> We could keep the form, but add additional members to the list, no?

That's simply too confusing, where different events have very different
indexes into the list to get the same property.


reply via email to

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