From 23bcea43d9c56e829bf24877653d59a051e6cd19 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Wed, 27 Dec 2023 14:29:34 +0100 Subject: [PATCH 2/4] * src/keyboard.c (requeued_events_pending_p): Revive * src/keyboard.c (requeued_events_pending_p): Fix 'requeued_events_pending_p' function by adding missing 'Vunread_*_event' variables. When 'requeued_events_pending_p' was added (commit b1878f450868365f27af0c71900237056a44f900), 'Vunread_command_events' was the only variable of this kind. * (Finput_pending_p): Actually use the changed function. --- src/keyboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index d47363bc39f..041b616d9aa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11556,7 +11556,7 @@ clear_input_pending (void) } /* Return true if there are pending requeued events. - This isn't used yet. The hope is to make wait_reading_process_output + In the future, the hope is to make wait_reading_process_output call it, and return if it runs Lisp code that unreads something. The problem is, kbd_buffer_get_event needs to be fixed to know what to do in that case. It isn't trivial. */ @@ -11564,7 +11564,9 @@ clear_input_pending (void) bool requeued_events_pending_p (void) { - return (CONSP (Vunread_command_events)); + return (CONSP (Vunread_command_events) + || CONSP (Vunread_post_input_method_events) + || CONSP (Vunread_input_method_events)); } DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0, @@ -11575,9 +11577,7 @@ DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0, If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) (Lisp_Object check_timers) { - if (CONSP (Vunread_command_events) - || !NILP (Vunread_post_input_method_events) - || !NILP (Vunread_input_method_events)) + if (requeued_events_pending_p ()) return (Qt); /* Process non-user-visible events (Bug#10195). */ -- 2.43.0