diff options
| author | Stefan Monnier | 2014-12-17 17:08:07 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-12-17 17:08:07 -0500 |
| commit | ec10ba2792eef613caf47fff83e869d4bc177616 (patch) | |
| tree | 1c16a8df5eb677cbbc696284df6ce8c8d16a69aa /src | |
| parent | 92bad2aa0589d837e48af58f09134b48b32cfbb7 (diff) | |
| download | emacs-ec10ba2792eef613caf47fff83e869d4bc177616.tar.gz emacs-ec10ba2792eef613caf47fff83e869d4bc177616.zip | |
* src/keyboard.c (swallow_events): Don't redisplay if there's input pending.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/dispnew.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/process.c | 6 |
4 files changed, 11 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3854803d843..01653de22ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-12-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c (swallow_events): Don't redisplay if there's input pending. | ||
| 4 | |||
| 1 | 2014-12-17 Ulf Jasper <ulf.jasper@web.de> | 5 | 2014-12-17 Ulf Jasper <ulf.jasper@web.de> |
| 2 | 6 | ||
| 3 | * image.c (svg_load): Watch out for nil value of current buffer's | 7 | * image.c (svg_load): Watch out for nil value of current buffer's |
diff --git a/src/dispnew.c b/src/dispnew.c index a68901acd57..212caa8b7d6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5785,7 +5785,7 @@ immediately by pending input. */) | |||
| 5785 | { | 5785 | { |
| 5786 | ptrdiff_t count; | 5786 | ptrdiff_t count; |
| 5787 | 5787 | ||
| 5788 | swallow_events (1); | 5788 | swallow_events (true); |
| 5789 | if ((detect_input_pending_run_timers (1) | 5789 | if ((detect_input_pending_run_timers (1) |
| 5790 | && NILP (force) && !redisplay_dont_pause) | 5790 | && NILP (force) && !redisplay_dont_pause) |
| 5791 | || !NILP (Vexecuting_kbd_macro)) | 5791 | || !NILP (Vexecuting_kbd_macro)) |
diff --git a/src/keyboard.c b/src/keyboard.c index beb34592d1c..9e12f590c57 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2582,7 +2582,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2582 | user-visible, such as X selection_request events. */ | 2582 | user-visible, such as X selection_request events. */ |
| 2583 | if (input_pending | 2583 | if (input_pending |
| 2584 | || detect_input_pending_run_timers (0)) | 2584 | || detect_input_pending_run_timers (0)) |
| 2585 | swallow_events (0); /* May clear input_pending. */ | 2585 | swallow_events (false); /* May clear input_pending. */ |
| 2586 | 2586 | ||
| 2587 | /* Redisplay if no pending input. */ | 2587 | /* Redisplay if no pending input. */ |
| 2588 | while (!input_pending) | 2588 | while (!input_pending) |
| @@ -2598,7 +2598,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2598 | 2598 | ||
| 2599 | /* Input arrived and pre-empted redisplay. | 2599 | /* Input arrived and pre-empted redisplay. |
| 2600 | Process any events which are not user-visible. */ | 2600 | Process any events which are not user-visible. */ |
| 2601 | swallow_events (0); | 2601 | swallow_events (false); |
| 2602 | /* If that cleared input_pending, try again to redisplay. */ | 2602 | /* If that cleared input_pending, try again to redisplay. */ |
| 2603 | } | 2603 | } |
| 2604 | 2604 | ||
| @@ -4370,7 +4370,7 @@ swallow_events (bool do_display) | |||
| 4370 | old_timers_run = timers_run; | 4370 | old_timers_run = timers_run; |
| 4371 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); | 4371 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); |
| 4372 | 4372 | ||
| 4373 | if (timers_run != old_timers_run && do_display) | 4373 | if (!input_pending && timers_run != old_timers_run && do_display) |
| 4374 | redisplay_preserve_echo_area (7); | 4374 | redisplay_preserve_echo_area (7); |
| 4375 | } | 4375 | } |
| 4376 | 4376 | ||
diff --git a/src/process.c b/src/process.c index e59ca5863d5..c58ae3efd28 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4473,7 +4473,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4473 | && ! EQ (wait_proc->status, Qrun) | 4473 | && ! EQ (wait_proc->status, Qrun) |
| 4474 | && ! EQ (wait_proc->status, Qconnect)) | 4474 | && ! EQ (wait_proc->status, Qconnect)) |
| 4475 | { | 4475 | { |
| 4476 | bool read_some_bytes = 0; | 4476 | bool read_some_bytes = false; |
| 4477 | 4477 | ||
| 4478 | clear_waiting_for_input (); | 4478 | clear_waiting_for_input (); |
| 4479 | XSETPROCESS (proc, wait_proc); | 4479 | XSETPROCESS (proc, wait_proc); |
| @@ -4689,13 +4689,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4689 | unsigned old_timers_run = timers_run; | 4689 | unsigned old_timers_run = timers_run; |
| 4690 | struct buffer *old_buffer = current_buffer; | 4690 | struct buffer *old_buffer = current_buffer; |
| 4691 | Lisp_Object old_window = selected_window; | 4691 | Lisp_Object old_window = selected_window; |
| 4692 | bool leave = 0; | 4692 | bool leave = false; |
| 4693 | 4693 | ||
| 4694 | if (detect_input_pending_run_timers (do_display)) | 4694 | if (detect_input_pending_run_timers (do_display)) |
| 4695 | { | 4695 | { |
| 4696 | swallow_events (do_display); | 4696 | swallow_events (do_display); |
| 4697 | if (detect_input_pending_run_timers (do_display)) | 4697 | if (detect_input_pending_run_timers (do_display)) |
| 4698 | leave = 1; | 4698 | leave = true; |
| 4699 | } | 4699 | } |
| 4700 | 4700 | ||
| 4701 | /* If a timer has run, this might have changed buffers | 4701 | /* If a timer has run, this might have changed buffers |