emacs-devel
[Top][All Lists]
Advanced

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

Re: BUFFER_SWITCH_EVENT


From: Stefan Monnier
Subject: Re: BUFFER_SWITCH_EVENT
Date: Wed, 26 Sep 2018 08:27:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> This is read_key_sequence: its return value should depend on where the
>> keys&buttons are pressed
>
> No, I meant the effect of the above on the global state, not on what
> read_key_sequence returns.  keyboard.c code is not only about reading
> input, it is part of the main loop, so it affects the global state due
> to changes done by timers, process filters, etc.

I see.  I don't see why it should be read_key_sequence's responsability
to "fix" those issues (and honestly, I don't see exactly what bad
consequences it could have anyway.  AFAIK the command loop will/should
select the selected-window's buffer before running the next command).

If we're preoccupied from such async changes to current-buffer, I think
we should save&restore the current buffer around the code which runs
process filters and timers (and indeed, if we treated them as Elisp
threads, that's the behavior we'd get).


        Stefan



reply via email to

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