Mercurial > emacs
changeset 46109:60d71404b887
(timer_last_idleness_start_time): New variable.
(timer_start_idle): Set that.
(read_key_sequence): Use that to reset timer_idleness_start_time
to previous value.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 01 Jul 2002 08:04:04 +0000 |
parents | 7b8b4ec9573c |
children | 3c7e78fd0dae |
files | src/keyboard.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Mon Jul 01 08:00:07 2002 +0000 +++ b/src/keyboard.c Mon Jul 01 08:04:04 2002 +0000 @@ -664,6 +664,11 @@ static EMACS_TIME timer_idleness_start_time; +/* After Emacs stops being idle, this saves the last value + of timer_idleness_start_time from when it was idle. */ + +static EMACS_TIME timer_last_idleness_start_time; + /* Global variable declarations. */ @@ -4016,6 +4021,8 @@ EMACS_GET_TIME (timer_idleness_start_time); + timer_last_idleness_start_time = timer_idleness_start_time; + /* Mark all idle-time timers as once again candidates for running. */ for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers)) { @@ -8368,6 +8375,13 @@ keymap may have changed, so replay the sequence. */ if (BUFFERP (key)) { + EMACS_TIME initial_idleness_start_time + = timer_last_idleness_start_time; + + /* Resume idle state, using the same start-time as before. */ + timer_start_idle (); + timer_idleness_start_time = initial_idleness_start_time; + mock_input = t; /* Reset the current buffer from the selected window in case something changed the former and not the latter.