Mercurial > emacs
diff src/keyboard.c @ 72391:b2e68179adaa
* keyboard.c (read_char): Don't reset idle timers if a time limit
is supplied.
| author | Chong Yidong <cyd@stupidchicken.com> |
|---|---|
| date | Mon, 14 Aug 2006 18:32:23 +0000 |
| parents | 111c88ecd861 |
| children | 949ddf473439 |
line wrap: on
line diff
--- a/src/keyboard.c Mon Aug 14 09:58:12 2006 +0000 +++ b/src/keyboard.c Mon Aug 14 18:32:23 2006 +0000 @@ -2679,7 +2679,14 @@ 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 @@ /* 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);
