diff options
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index bac830d692c..d81f62c6763 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4584,12 +4584,8 @@ timer_check (do_it_now) | |||
| 4584 | { | 4584 | { |
| 4585 | int count = SPECPDL_INDEX (); | 4585 | int count = SPECPDL_INDEX (); |
| 4586 | Lisp_Object old_deactivate_mark = Vdeactivate_mark; | 4586 | Lisp_Object old_deactivate_mark = Vdeactivate_mark; |
| 4587 | struct buffer *b; | ||
| 4587 | 4588 | ||
| 4588 | #if 0 /* This shouldn't be necessary anymore. --lorentey */ | ||
| 4589 | /* On unbind_to, resume allowing input from any kboard, if that | ||
| 4590 | was true before. */ | ||
| 4591 | record_single_kboard_state (); | ||
| 4592 | #endif | ||
| 4593 | /* Mark the timer as triggered to prevent problems if the lisp | 4589 | /* Mark the timer as triggered to prevent problems if the lisp |
| 4594 | code fails to reschedule it right. */ | 4590 | code fails to reschedule it right. */ |
| 4595 | vector[0] = Qt; | 4591 | vector[0] = Qt; |
| @@ -4601,6 +4597,13 @@ timer_check (do_it_now) | |||
| 4601 | timers_run++; | 4597 | timers_run++; |
| 4602 | unbind_to (count, Qnil); | 4598 | unbind_to (count, Qnil); |
| 4603 | 4599 | ||
| 4600 | /* We must ensure that the current buffer is the same as | ||
| 4601 | the selected window's buffer, because the timers may | ||
| 4602 | have made another buffer current (bug#1458). */ | ||
| 4603 | b = XBUFFER (XWINDOW (selected_window)->buffer); | ||
| 4604 | if (b != current_buffer) | ||
| 4605 | set_buffer_internal (b); | ||
| 4606 | |||
| 4604 | /* Since we have handled the event, | 4607 | /* Since we have handled the event, |
| 4605 | we don't need to tell the caller to wake up and do it. */ | 4608 | we don't need to tell the caller to wake up and do it. */ |
| 4606 | } | 4609 | } |