# HG changeset patch # User Gerd Moellmann # Date 993558659 0 # Node ID 7255d1f70b8221f9c0f05ec374719f289d96a317 # Parent a23820c19d0346bf557c6ab56c8711b6773d7c17 (read_char) : Record the previous idle start time before calling timer_stop_idle. (read_char) : After processing a help-echo event, restore the previous idle start time. diff -r a23820c19d03 -r 7255d1f70b82 src/keyboard.c --- a/src/keyboard.c Tue Jun 26 11:52:27 2001 +0000 +++ b/src/keyboard.c Tue Jun 26 12:30:59 2001 +0000 @@ -644,6 +644,10 @@ Lisp_Object Vglobal_disable_point_adjustment; +/* The time when Emacs started being idle. */ + +static EMACS_TIME timer_idleness_start_time; + /* Global variable declarations. */ @@ -2095,6 +2099,7 @@ volatile Lisp_Object also_record; volatile int reread; struct gcpro gcpro1, gcpro2; + EMACS_TIME last_idle_start; also_record = Qnil; @@ -2588,6 +2593,9 @@ non_reread: + /* Record the last idle start time so that we can reset it + should the next event read be a help-echo. */ + last_idle_start = timer_idleness_start_time; timer_stop_idle (); start_polling (); @@ -2804,6 +2812,9 @@ object = Fnth (make_number (4), c); position = Fnth (make_number (5), c); show_help_echo (help, window, object, position, 0); + + /* We stopped being idle for this event; undo that. */ + timer_idleness_start_time = last_idle_start; goto retry; } @@ -3824,8 +3835,6 @@ redisplay_preserve_echo_area (7); } -static EMACS_TIME timer_idleness_start_time; - /* Record the start of when Emacs is idle, for the sake of running idle-time timers. */