From 6e4e64a8e6496201260419202095715461f2d239 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 Jun 1997 08:22:49 +0000 Subject: [PATCH] (read_char): Add a call to swallow_events when deciding whether to redisplay. (swallow_events): Add forward declaration. --- src/keyboard.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 0303ab4fa65..7cd3c570d6c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -482,6 +482,8 @@ extern char *x_get_keysym_name (); static void record_menu_key (); +void swallow_events (); + Lisp_Object Qpolling_period; /* List of absolute timers. Appears in order of next scheduled event. */ @@ -1787,9 +1789,15 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) goto reread_first; } - if (commandflag >= 0 && !input_pending - && !detect_input_pending_run_timers (0)) - redisplay (); + if (commandflag >= 0) + { + if (input_pending + || detect_input_pending_run_timers (0)) + swallow_events (0); + + if (!input_pending) + redisplay (); + } /* Message turns off echoing unless more keystrokes turn it on again. */ if (echo_area_glyphs && *echo_area_glyphs -- 2.39.2