From: Chong Yidong Date: Mon, 14 Aug 2006 18:32:23 +0000 (+0000) Subject: * keyboard.c (read_char): Don't reset idle timers if a time limit X-Git-Tag: emacs-pretest-22.0.90~1003 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70282fce62e13117947dfb4151e93eeb60251d65;p=emacs.git * keyboard.c (read_char): Don't reset idle timers if a time limit is supplied. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7bfc9a88967..e97b91cf42e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-14 Chong Yidong + + * keyboard.c (read_char): Don't reset idle timers if a time limit + is supplied. + 2006-08-14 Kim F. Storm * .gdbinit (pitx): Print iterator position. diff --git a/src/keyboard.c b/src/keyboard.c index c715eadeb80..bea35a05731 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2679,7 +2679,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) goto non_reread; } - timer_start_idle (); + /* Start idle timers. If a time limit is supplied, we don't reset + idle timers. This avoids an infinite recursion in case an idle + timer calls `sit-for'. */ + + if (end_time) + timer_resume_idle (); + else + timer_start_idle (); /* If in middle of key sequence and minibuffer not active, start echoing if enough time elapses. */ @@ -2879,7 +2886,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) /* Actually read a character, waiting if necessary. */ save_getcjmp (save_jump); restore_getcjmp (local_getcjmp); - timer_start_idle (); + if (end_time) + timer_resume_idle (); + else + timer_start_idle (); c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); restore_getcjmp (save_jump);