[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
- Re: BUFFER_SWITCH_EVENT (was: while-no-input interrupted by *shell*), (continued)
- Re: BUFFER_SWITCH_EVENT (was: while-no-input interrupted by *shell*), Eli Zaretskii, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Stefan Monnier, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Stefan Monnier, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Stefan Monnier, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Stefan Monnier, 2018/09/25
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/26
- Re: BUFFER_SWITCH_EVENT,
Stefan Monnier <=
Re: while-no-input interrupted by *shell*, Andreas Schwab, 2018/09/24
Re: while-no-input interrupted by *shell*, Stefan Monnier, 2018/09/24
while-no-input and pending input (was: while-no-input interrupted by *shell*), Michael Heerdegen, 2018/09/25