[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: |
Eli Zaretskii |
Subject: |
Re: master 3b41141708: Expose the name of an event's input device to Lisp |
Date: |
Sun, 10 Apr 2022 11:12:36 +0300 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
> Date: Sun, 10 Apr 2022 15:37:30 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > We have this in many places in Emacs already, so adding one more will
> > not hurt too much. Dispatch on the first element of the list is easy
> > and produces code that is quite readable and maintainable, IMO.
> >
> > Of course, if more elegant ways exist, I don't object to using them,
> > quite the contrary. But if not, I see nothing especially wrong with
> > doing what you call "very confusing", because we do it elsewhere.
>
> Hmm, do we use keywords anywhere inside Lisp events? If not, then
> here's a simple way to add a property list to the end of event lists:
>
> (defun event-plist (event)
> "Return the property list of EVENT."
> (while (and event (not (keywordp (car event))))
> (setq event (cdr event)))
> event)
>
> Then, additional information could just be added to the end of each
> event by appending any property list that associates keywords.
It's possible. But using ordered lists is also OK.
Having keyword/value pairs would probably call for a new kind of event
list, so that applications could know whether to use indexed access or
keyword-based access.
- 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, 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 <=
- Re: master 3b41141708: Expose the name of an event's input device to Lisp, Eli Zaretskii, 2022/04/09