diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2025-03-03 09:32:08 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-03-03 09:44:42 -0800 |
commit | 29a9fd4f4ba17822eca0f00c2037da3868bd874e (patch) | |
tree | 94f69a89281045884f84a10c3767ed0bb8f570d4 /lisp/emacs-lisp/vtable.el | |
parent | 96d26b493618f59bbdd4de86be65e784735541c8 (diff) | |
download | emacs-29a9fd4f4ba17822eca0f00c2037da3868bd874e.tar.gz emacs-29a9fd4f4ba17822eca0f00c2037da3868bd874e.tar.bz2 emacs-29a9fd4f4ba17822eca0f00c2037da3868bd874e.zip |
Avoid some union buffered_input_event uses
Simplify by using separate local vars for struct input_event and
struct selection_input_event, rather than a single local var that
is the union of the two. This makes the code easier to follow by
the human reader, and should help avoid GCC bug 117423
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423> and
therefore work around Emacs bug 76559 <https://bugs.gnu.org/76559>.
* src/androidterm.c (handle_one_android_event):
* src/gtkutil.c (xg_widget_key_press_event_cb):
* src/pgtkterm.c (evq_flush):
* src/xterm.c (handle_one_xevent): Use struct input_event and
kbd_buffer_store_event_hold, or struct selection_input_event and
kbd_buffer_store_selection_event_hold, rather than union
buffered_input_event and union buffered_input_event.
* src/keyboard.c (beware_long_paste, maybe_quit_while_no_input):
New functions, broken out from kbd_buffer_store_buffered_event.
(kbd_buffer_store_event_hold): Define here, with a simplified
version of the body of the old kbd_buffer_store_buffered_event,
rather than defining in keyboard.h. Specialize to struct
input_event.
(kbd_buffer_store_selection_event_hold): New function; it is
a simplified version of the old kbd_buffer_store_buffered_event,
specialized to struct selection_input_event.
(is_ignored_event_kind): Accept enum event_kind instead of
union buffered_input_event. All callers changed.
* src/keyboard.h (kbd_buffer_store_event_hold):
Remove definition, as keyboard.c now defines it.
* src/pgtkterm.c (evq_grow_if_needed): New function.
(evq_enqueue, evq_selection_enqueue): Two functions now,
not one. Args are now struct input_event const * or
struct selection_input_event const *, not
union buffered_input_event *. All callers changed.
This lets us simplify the callers so that they need
not use the union.
Diffstat (limited to 'lisp/emacs-lisp/vtable.el')
0 files changed, 0 insertions, 0 deletions