[Top][All Lists]

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

Re: while-no-input and pending input

From: Stefan Monnier
Subject: Re: while-no-input and pending input
Date: Fri, 12 Oct 2018 11:44:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> > > Why cannot you drain the event queue before calling while-no-input?
>> > How can I do this?
>> Call read-event with a short (or zero?) timeout in a loop, until it
>> returns nil?
> Thanks, I'll try that.
> And afterwards I should add the events back to `unread-command-events'?

Note that doing read-events and then pushing them to
unread-command-events can have undesired side-effects, so it's better
not to do that if at all possible.

> Could/should w-n-i generally ignore events in
> `while-no-input-ignore-events' - I mean, also the
> input-pending-p part?

Yes, it should.


reply via email to

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