emacs-devel
[Top][All Lists]
Advanced

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

Re: BUFFER_SWITCH_EVENT


From: Eli Zaretskii
Subject: Re: BUFFER_SWITCH_EVENT
Date: Wed, 26 Sep 2018 08:42:24 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Tue, 25 Sep 2018 17:50:21 -0400
> 
> >> -        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

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.



reply via email to

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