emacs-devel
[Top][All Lists]
Advanced

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

Manipulating unread-command-events


From: David Kastrup
Subject: Manipulating unread-command-events
Date: Wed, 15 Jul 2015 15:24:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi,

I have a package creating events for Midi input and it works by pushing
the created events into unread-command-events, sometimes several events
in one go.  This works only so-so, and particularly badly when recording
in keyboard macros (not only there, but the lossage there is much worse
than elsewhere).

If you do

git grep '(setq unread-command-events'

in the Emacs sources, it's rather obvious that _lots_ of Emacs internals
do not bother retaining any pending input in unread-command-events and
just plaster over whatever might have been stored there before.  When
looking closer at all of the resulting lines, it is rather the majority
of uses which overwrite any pending input there (the situation looks
slightly worse than it is because some good uses employ `push' rather
than `setq', but not all that many).

Any idea how to salvage that situation?  As it is, keyboard macro
recording is unusable when input is delivered from non-keyboard sources.
It probably loses about 10% of input for simultaneously delivered
events.

-- 
David Kastrup



reply via email to

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