[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 09:31:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Po Lu [2022-04-09 11:17:01] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> We could put it in the "posn" thingy, but at the same time it's not
>> really a "posn" and it's kinda weird to duplicate it into the start and
>> the end posn of an event. It would be better to associate it with the
>> event itself and have an `event-device` function to access it.
> But wouldn't that mean the `event-device' function would have to have a
> specific implementation for each kind of event, with different indexes
> passed to `nth', since we can only add information to the end of each
> event?
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.
Stefan
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, (continued)
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Lars Ingebrigtsen, 2022/04/11
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Brian Cully, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Stefan Monnier, 2022/04/08
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/08
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Stefan Monnier, 2022/04/08
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/08
- Re: master 3b41141708: Expose the name of an event's input device to Lisp,
Stefan Monnier <=
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Stefan Monnier, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/09
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Po Lu, 2022/04/10
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/10