aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-07-01 08:04:04 +0000
committerRichard M. Stallman2002-07-01 08:04:04 +0000
commit3021d3a9d95e01fefac3baa10cae9db2d0b5c54f (patch)
treea08780e82a83cda472dd7cba171c84938c0bd3db /src
parent95605b1b7a0621c5ee12369f1318474b9afedc4d (diff)
downloademacs-3021d3a9d95e01fefac3baa10cae9db2d0b5c54f.tar.gz
emacs-3021d3a9d95e01fefac3baa10cae9db2d0b5c54f.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c14
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
665static EMACS_TIME timer_idleness_start_time; 665static 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
670static 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.