From: Richard M. Stallman Date: Mon, 30 Jun 1997 08:22:49 +0000 (+0000) Subject: (read_char): Add a call to swallow_events X-Git-Tag: emacs-20.1~1445 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e4e64a8e6496201260419202095715461f2d239;p=emacs.git (read_char): Add a call to swallow_events when deciding whether to redisplay. (swallow_events): Add forward declaration. --- 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