Function: input-pending-p

input-pending-p is a function defined in keyboard.c.

Signature

(input-pending-p &optional CHECK-TIMERS)

Documentation

Return t if command input is currently available with no wait.

Actually, the value is nil only if we can be sure that no input is available; if there is a doubt, the value is t.

If CHECK-TIMERS is non-nil, timers that are ready to run will do so.

View in manual

Probably introduced at or before Emacs version 24.4.

Source Code

// Defined in /usr/src/emacs/src/keyboard.c
{
  if (requeued_events_pending_p ())
    return (Qt);

  /* Process non-user-visible events (Bug#10195).  */
  process_special_events ();

  return (get_input_pending ((NILP (check_timers)
                              ? 0 : READABLE_EVENTS_DO_TIMERS_NOW)
			     | READABLE_EVENTS_FILTER_EVENTS)
	  ? Qt : Qnil);
}