diff options
| author | Tim Ruffing | 2023-12-27 14:29:34 +0100 |
|---|---|---|
| committer | Stefan Monnier | 2024-03-10 10:40:07 -0400 |
| commit | 385a02cffde6d0fd80ff189704ad70cfebc3e8d4 (patch) | |
| tree | 27fe62dd85ca663e5fbcff8fc686bfbccc52213e /src | |
| parent | fbc5fb2561d9e1d4e5b69b349a26c49d30ffc938 (diff) | |
| download | emacs-385a02cffde6d0fd80ff189704ad70cfebc3e8d4.tar.gz emacs-385a02cffde6d0fd80ff189704ad70cfebc3e8d4.zip | |
* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment
* src/keyboard.c, src/keyboard.h (requeued_events_pending_p): Rename to
'requeued_command_events_pending_p' to clarify that the function covers
only command events. Fix wrong comment that claimed that the function
was unused.
* src/process.c (wait_reading_process_output): Update caller to use the
new name.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 8 | ||||
| -rw-r--r-- | src/keyboard.h | 2 | ||||
| -rw-r--r-- | src/process.c | 8 |
3 files changed, 7 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index b6fc568cde5..e5efde4ef53 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11565,14 +11565,10 @@ clear_input_pending (void) | |||
| 11565 | input_pending = false; | 11565 | input_pending = false; |
| 11566 | } | 11566 | } |
| 11567 | 11567 | ||
| 11568 | /* Return true if there are pending requeued events. | 11568 | /* Return true if there are pending requeued command events. */ |
| 11569 | This isn't used yet. The hope is to make wait_reading_process_output | ||
| 11570 | call it, and return if it runs Lisp code that unreads something. | ||
| 11571 | The problem is, kbd_buffer_get_event needs to be fixed to know what | ||
| 11572 | to do in that case. It isn't trivial. */ | ||
| 11573 | 11569 | ||
| 11574 | bool | 11570 | bool |
| 11575 | requeued_events_pending_p (void) | 11571 | requeued_command_events_pending_p (void) |
| 11576 | { | 11572 | { |
| 11577 | return (CONSP (Vunread_command_events)); | 11573 | return (CONSP (Vunread_command_events)); |
| 11578 | } | 11574 | } |
diff --git a/src/keyboard.h b/src/keyboard.h index 68e68bc2ae3..600aaf11517 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -483,7 +483,7 @@ extern void set_poll_suppress_count (int); | |||
| 483 | extern int gobble_input (void); | 483 | extern int gobble_input (void); |
| 484 | extern bool input_polling_used (void); | 484 | extern bool input_polling_used (void); |
| 485 | extern void clear_input_pending (void); | 485 | extern void clear_input_pending (void); |
| 486 | extern bool requeued_events_pending_p (void); | 486 | extern bool requeued_command_events_pending_p (void); |
| 487 | extern void bind_polling_period (int); | 487 | extern void bind_polling_period (int); |
| 488 | extern int make_ctrl_char (int) ATTRIBUTE_CONST; | 488 | extern int make_ctrl_char (int) ATTRIBUTE_CONST; |
| 489 | extern void stuff_buffered_input (Lisp_Object); | 489 | extern void stuff_buffered_input (Lisp_Object); |
diff --git a/src/process.c b/src/process.c index 48a2c0c8e53..6b8b483cdf7 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5439,7 +5439,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5439 | 5439 | ||
| 5440 | /* If there is unread keyboard input, also return. */ | 5440 | /* If there is unread keyboard input, also return. */ |
| 5441 | if (read_kbd != 0 | 5441 | if (read_kbd != 0 |
| 5442 | && requeued_events_pending_p ()) | 5442 | && requeued_command_events_pending_p ()) |
| 5443 | break; | 5443 | break; |
| 5444 | 5444 | ||
| 5445 | /* This is so a breakpoint can be put here. */ | 5445 | /* This is so a breakpoint can be put here. */ |
| @@ -5849,7 +5849,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5849 | 5849 | ||
| 5850 | /* If there is unread keyboard input, also return. */ | 5850 | /* If there is unread keyboard input, also return. */ |
| 5851 | if (read_kbd != 0 | 5851 | if (read_kbd != 0 |
| 5852 | && requeued_events_pending_p ()) | 5852 | && requeued_command_events_pending_p ()) |
| 5853 | break; | 5853 | break; |
| 5854 | 5854 | ||
| 5855 | /* If we are not checking for keyboard input now, | 5855 | /* If we are not checking for keyboard input now, |
| @@ -8036,7 +8036,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 8036 | 8036 | ||
| 8037 | /* If there is unread keyboard input, also return. */ | 8037 | /* If there is unread keyboard input, also return. */ |
| 8038 | if (read_kbd != 0 | 8038 | if (read_kbd != 0 |
| 8039 | && requeued_events_pending_p ()) | 8039 | && requeued_command_events_pending_p ()) |
| 8040 | break; | 8040 | break; |
| 8041 | 8041 | ||
| 8042 | if (timespec_valid_p (timer_delay)) | 8042 | if (timespec_valid_p (timer_delay)) |
| @@ -8109,7 +8109,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 8109 | 8109 | ||
| 8110 | /* If there is unread keyboard input, also return. */ | 8110 | /* If there is unread keyboard input, also return. */ |
| 8111 | if (read_kbd | 8111 | if (read_kbd |
| 8112 | && requeued_events_pending_p ()) | 8112 | && requeued_command_events_pending_p ()) |
| 8113 | break; | 8113 | break; |
| 8114 | 8114 | ||
| 8115 | /* If wait_for_cell. check for keyboard input | 8115 | /* If wait_for_cell. check for keyboard input |