[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: |
Tue, 25 Sep 2018 17:50:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> - if (fix_current_buffer)
>> - {
>> - if (! FRAME_LIVE_P (XFRAME (selected_frame)))
>> - Fkill_emacs (Qnil);
>> - if (XBUFFER (XWINDOW (selected_window)->contents)
>> - != current_buffer)
>> - Fset_buffer (XWINDOW (selected_window)->contents);
>> - }
> This part restores the current buffer from the selected-window's
> buffer. With it deleted, what if a process filter or a timer switches
> buffers while we are processing a key sequence?
Indeed, what if?
This is read_key_sequence: its return value should depend on where the
keys&buttons are pressed rather than the context in which the function
is called, so it should presumably not be affected by current-buffer as
long as it uses the right set of active keymaps.
I suspect we do need some `Fset_buffer (XWINDOW
(selected_window)->contents)` maybe inside active_maps or right after
`replay_sequence:` but I haven't managed to trigger problems linked to
that yet.
The `starting_buffer` business also looks a bit fishy.
Stefan
- Re: while-no-input interrupted by *shell*, (continued)
- Re: while-no-input interrupted by *shell*, Eli Zaretskii, 2018/09/25
- BUFFER_SWITCH_EVENT (was: while-no-input interrupted by *shell*), Stefan Monnier, 2018/09/25
- 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 <=
- Re: BUFFER_SWITCH_EVENT, Eli Zaretskii, 2018/09/26
- Re: BUFFER_SWITCH_EVENT, Stefan Monnier, 2018/09/26
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