diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 99f060533ea..fa0415edc24 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -664,6 +664,11 @@ Lisp_Object Vglobal_disable_point_adjustment; | |||
| 664 | 664 | ||
| 665 | static EMACS_TIME timer_idleness_start_time; | 665 | static EMACS_TIME timer_idleness_start_time; |
| 666 | 666 | ||
| 667 | /* After Emacs stops being idle, this saves the last value | ||
| 668 | of timer_idleness_start_time from when it was idle. */ | ||
| 669 | |||
| 670 | static EMACS_TIME timer_last_idleness_start_time; | ||
| 671 | |||
| 667 | 672 | ||
| 668 | /* Global variable declarations. */ | 673 | /* Global variable declarations. */ |
| 669 | 674 | ||
| @@ -4016,6 +4021,8 @@ timer_start_idle () | |||
| 4016 | 4021 | ||
| 4017 | EMACS_GET_TIME (timer_idleness_start_time); | 4022 | EMACS_GET_TIME (timer_idleness_start_time); |
| 4018 | 4023 | ||
| 4024 | timer_last_idleness_start_time = timer_idleness_start_time; | ||
| 4025 | |||
| 4019 | /* Mark all idle-time timers as once again candidates for running. */ | 4026 | /* Mark all idle-time timers as once again candidates for running. */ |
| 4020 | for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers)) | 4027 | for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers)) |
| 4021 | { | 4028 | { |
| @@ -8368,6 +8375,13 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 8368 | keymap may have changed, so replay the sequence. */ | 8375 | keymap may have changed, so replay the sequence. */ |
| 8369 | if (BUFFERP (key)) | 8376 | if (BUFFERP (key)) |
| 8370 | { | 8377 | { |
| 8378 | EMACS_TIME initial_idleness_start_time | ||
| 8379 | = timer_last_idleness_start_time; | ||
| 8380 | |||
| 8381 | /* Resume idle state, using the same start-time as before. */ | ||
| 8382 | timer_start_idle (); | ||
| 8383 | timer_idleness_start_time = initial_idleness_start_time; | ||
| 8384 | |||
| 8371 | mock_input = t; | 8385 | mock_input = t; |
| 8372 | /* Reset the current buffer from the selected window | 8386 | /* Reset the current buffer from the selected window |
| 8373 | in case something changed the former and not the latter. | 8387 | in case something changed the former and not the latter. |