Mercurial > emacs
comparison src/process.c @ 37465:f790d83ea743
(wait_reading_process_input): Call
record_asynch_buffer_change only if a timer really changed
buffers.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 25 Apr 2001 15:12:21 +0000 |
parents | 49147b9fe206 |
children | 270e6cb4c672 |
comparison
equal
deleted
inserted
replaced
37464:d0e1a8c0aa8c | 37465:f790d83ea743 |
---|---|
2451 EMACS_TIME timer_delay; | 2451 EMACS_TIME timer_delay; |
2452 | 2452 |
2453 do | 2453 do |
2454 { | 2454 { |
2455 int old_timers_run = timers_run; | 2455 int old_timers_run = timers_run; |
2456 struct buffer *old_buffer = current_buffer; | |
2456 | 2457 |
2457 timer_delay = timer_check (1); | 2458 timer_delay = timer_check (1); |
2458 | 2459 |
2459 /* If a timer has run, this might have changed buffers | 2460 /* If a timer has run, this might have changed buffers |
2460 an alike. Make read_key_sequence aware of that. */ | 2461 an alike. Make read_key_sequence aware of that. */ |
2461 if (timers_run != old_timers_run | 2462 if (timers_run != old_timers_run |
2463 && old_buffer != current_buffer | |
2462 && waiting_for_user_input_p == -1) | 2464 && waiting_for_user_input_p == -1) |
2463 record_asynch_buffer_change (); | 2465 record_asynch_buffer_change (); |
2464 | 2466 |
2465 if (timers_run != old_timers_run && do_display) | 2467 if (timers_run != old_timers_run && do_display) |
2466 /* We must retry, since a timer may have requeued itself | 2468 /* We must retry, since a timer may have requeued itself |
2676 to give it higher priority than subprocesses */ | 2678 to give it higher priority than subprocesses */ |
2677 | 2679 |
2678 if (XINT (read_kbd) != 0) | 2680 if (XINT (read_kbd) != 0) |
2679 { | 2681 { |
2680 int old_timers_run = timers_run; | 2682 int old_timers_run = timers_run; |
2683 struct buffer *old_buffer = current_buffer; | |
2681 int leave = 0; | 2684 int leave = 0; |
2682 | 2685 |
2683 if (detect_input_pending_run_timers (do_display)) | 2686 if (detect_input_pending_run_timers (do_display)) |
2684 { | 2687 { |
2685 swallow_events (do_display); | 2688 swallow_events (do_display); |
2688 } | 2691 } |
2689 | 2692 |
2690 /* If a timer has run, this might have changed buffers | 2693 /* If a timer has run, this might have changed buffers |
2691 an alike. Make read_key_sequence aware of that. */ | 2694 an alike. Make read_key_sequence aware of that. */ |
2692 if (timers_run != old_timers_run | 2695 if (timers_run != old_timers_run |
2693 && waiting_for_user_input_p == -1) | 2696 && waiting_for_user_input_p == -1 |
2697 && old_buffer != current_buffer) | |
2694 record_asynch_buffer_change (); | 2698 record_asynch_buffer_change (); |
2695 | 2699 |
2696 if (leave) | 2700 if (leave) |
2697 break; | 2701 break; |
2698 } | 2702 } |