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: Eli Zaretskii
Subject: Re: master 3b41141708: Expose the name of an event's input device to Lisp
Date: Sat, 09 Apr 2022 09:22:48 +0300

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 09 Apr 2022 08:24:49 +0800
> 
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> >>> Which event the global variable applies to is also perfectly clear: it
> >>> applies to the last event that was read, either by the command loop or
> >>> read-event.
> >> Yeah, it works, but relying on state is ugly and better avoided if
> >> we can.
> >
> > How 'bout a midway solution: we keep the var but we additionally put
> > that info into those events where we can?
> 
> I'm fine with that, but we need a consistent way to get it from the
> event structures.
> 
> WDYT about putting the device in the mouse position list?  (Of course,
> Eli's concerns about the info itself will have to be addressed.)
> 
> That way, we can have a single function `posn-device' to access the
> device.

>From where I stand, I didn't yet understand why we would need to have
the information about the "device" on the level where events are
interpreted by Lisp programs.  Introducing "devices" on that level is
a slippery slope: it will inevitably and naturally lead us to platform
dependencies where IMO we prefer not to have such dependencies.  So I
think we must try very hard to avoid using a notion of "device" on
that level, and try to come up with alternative ways of letting Emacs
do whatever it should without knowing about "devices".



reply via email to

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