]> git.eshelyaron.com Git - emacs.git/commit
* src/keyboard.c: Fix bug#5803.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Dec 2020 14:56:04 +0000 (09:56 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Dec 2020 14:56:04 +0000 (09:56 -0500)
commitadbb4eacc2a984c0fc0b65ec761368fd9067d6c5
treef2496954a664e3c02f01a76b4f22ec1a479fd3d9
parent7ee0fc0dc1a7cba8a3e965f411aca498a7db3f4f
* src/keyboard.c: Fix bug#5803.

A long time ago, `read_key_sequence` used to read the keymaps at the
start, so if something happened between this start and the moment
the user actually hits a key, `read_key_sequence` could end up using
the wrong keymaps.  To work around this problem, the code used
`record_asynch_buffer_change` to try and trigger `read_key_sequence`
to re-read the keymaps in some known cases.

Several years ago, `read_key_sequence` was changed so as to read the keymaps
only once the user hits a key, making this machinery now redundant
(and also harmful apparently in bug#5803 because it introduces
"spurious" events).

So we here remove `record_asynch_buffer_change` and the
`BUFFER_SWITCH_EVENT` and `Qbuffer_switch` pseudo-events it generated.

* src/termhooks.h (enum event_kind): Delete `BUFFER_SWITCH_EVENT`.
* src/keyboard.c: (record_asynch_buffer_change): Delete function.
(syms_of_keyboard): Delete `Qbuffer_switch`.
(force_auto_save_soon, readable_events)
(kbd_buffer_store_buffered_event, kbd_buffer_get_event)
(make_lispy_event):
* src/xterm.c (handle_one_xevent):
* src/w32term.c (w32_read_socket):
* src/process.c (wait_reading_process_output)
(read_and_dispose_of_process_output, exec_sentinel): Simplify accordingly.
src/keyboard.c
src/keyboard.h
src/process.c
src/termhooks.h
src/thread.h
src/w32term.c
src/xterm.c