emacs-devel
[Top][All Lists]
Advanced

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

BUFFER_SWITCH_EVENT (was: while-no-input interrupted by *shell*)


From: Stefan Monnier
Subject: BUFFER_SWITCH_EVENT (was: while-no-input interrupted by *shell*)
Date: Tue, 25 Sep 2018 11:25:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> When output from a subprocess arrives, we insert a buffer-switch event
> into the input queue, and that counts as input.  Therefater, any code
> that calls maybe_quit will cause while-no-input to throw.  The
> backtrace which shows that is below, for the record.
> Here's a patch, comments welcome.

Looks good, thanks.

I do wonder what these BUFFER_SWITCH_EVENT are for, tho.
In record_asynch_buffer_change it says:

  /* We don't need a buffer-switch event unless Emacs is waiting for input.
     The purpose of the event is to make read_key_sequence look up the
     keymaps again.  If we aren't in read_key_sequence, we don't need one,
     and the event could cause trouble by messing up (input-pending-p).
     Note: Fwaiting_for_user_input_p always returns nil when async
     subprocesses aren't supported.  */

but I don't see why we'd need to look up the keymaps again.


        Stefan




reply via email to

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