From fdbb67fec74be182a25755ce5a6e3019256998dd Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 26 Jun 2001 12:31:30 +0000 Subject: [PATCH] (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. --- src/ChangeLog | 5 +++++ src/keyboard.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6e51be5b1c7..46986d2fb5a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2001-06-26 Gerd Moellmann + * keyboard.c (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. + * xdisp.c (handle_invisible_prop): Deal with overlay strings at the start of invisible text. (setup_for_ellipsis): New function. diff --git a/src/keyboard.c b/src/keyboard.c index 18c1f3e1e3a..927e986b268 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -644,6 +644,10 @@ Lisp_Object Vdisable_point_adjustment; 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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) volatile Lisp_Object also_record; volatile int reread; struct gcpro gcpro1, gcpro2; + EMACS_TIME last_idle_start; also_record = Qnil; @@ -2588,6 +2593,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) 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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) 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 @@ swallow_events (do_display) 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. */ -- 2.39.5