]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment
authorTim Ruffing <crypto@timruffing.de>
Wed, 27 Dec 2023 13:29:34 +0000 (14:29 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:26:09 +0000 (10:26 +0100)
* 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.

(cherry picked from commit 385a02cffde6d0fd80ff189704ad70cfebc3e8d4)

src/keyboard.c
src/keyboard.h
src/process.c

index b6fc568cde5b93628c950363fa53147de1a840cb..e5efde4ef535d5def7302cae86207e4e5315f321 100644 (file)
@@ -11565,14 +11565,10 @@ clear_input_pending (void)
   input_pending = false;
 }
 
-/* Return true if there are pending requeued events.
-   This isn't used yet.  The hope is to make wait_reading_process_output
-   call it, and return if it runs Lisp code that unreads something.
-   The problem is, kbd_buffer_get_event needs to be fixed to know what
-   to do in that case.  It isn't trivial.  */
+/* Return true if there are pending requeued command events.  */
 
 bool
-requeued_events_pending_p (void)
+requeued_command_events_pending_p (void)
 {
   return (CONSP (Vunread_command_events));
 }
index 68e68bc2ae3779ec3a56d1f4638db28463ce709c..600aaf11517e484ec43e6c9507ab5d128329a939 100644 (file)
@@ -483,7 +483,7 @@ extern void set_poll_suppress_count (int);
 extern int gobble_input (void);
 extern bool input_polling_used (void);
 extern void clear_input_pending (void);
-extern bool requeued_events_pending_p (void);
+extern bool requeued_command_events_pending_p (void);
 extern void bind_polling_period (int);
 extern int make_ctrl_char (int) ATTRIBUTE_CONST;
 extern void stuff_buffered_input (Lisp_Object);
index 48a2c0c8e53fa96b52558a0917a2d6eb04922300..6b8b483cdf7ca88db861151363f3090b0fe3a764 100644 (file)
@@ -5439,7 +5439,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 
          /* If there is unread keyboard input, also return.  */
          if (read_kbd != 0
-             && requeued_events_pending_p ())
+             && requeued_command_events_pending_p ())
            break;
 
           /* 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,
 
       /* If there is unread keyboard input, also return.  */
       if (read_kbd != 0
-         && requeued_events_pending_p ())
+         && requeued_command_events_pending_p ())
        break;
 
       /* 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,
 
          /* If there is unread keyboard input, also return.  */
          if (read_kbd != 0
-             && requeued_events_pending_p ())
+             && requeued_command_events_pending_p ())
            break;
 
          if (timespec_valid_p (timer_delay))
@@ -8109,7 +8109,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 
       /* If there is unread keyboard input, also return.  */
       if (read_kbd
-         && requeued_events_pending_p ())
+         && requeued_command_events_pending_p ())
        break;
 
       /* If wait_for_cell. check for keyboard input