# HG changeset patch # User Richard M. Stallman # Date 841545838 0 # Node ID 96edeb28351533f7405e7facdf3ac51214953c75 # Parent 2ee7579db4a937831efabea692830ce7c292a8fe (requeued_events_pending_p): New function. diff -r 2ee7579db4a9 -r 96edeb283515 src/keyboard.c --- a/src/keyboard.c Sun Sep 01 02:42:04 1996 +0000 +++ b/src/keyboard.c Sun Sep 01 02:43:58 1996 +0000 @@ -7081,8 +7081,7 @@ return input_pending; } -/* Return nonzero if input events are pending. - Execute timers immediately; don't make events for them. */ +/* Return nonzero if input events are pending, and run any pending timers. */ detect_input_pending_run_timers (do_display) int do_display; @@ -7106,6 +7105,18 @@ input_pending = 0; } +/* Return nonzero if there are pending requeued events. + This isn't used yet. The hope is to make wait_reading_process_input + call it, and return 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. */ + +requeued_events_pending_p () +{ + return (!NILP (Vunread_command_events) || unread_command_char != -1); +} + + DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 0, 0, "T if command input is currently available with no waiting.\n\ Actually, the value is nil only if we can be sure that no input is available.")