From: Richard M. Stallman Date: Tue, 21 Dec 2004 11:46:47 +0000 (+0000) Subject: (Event Input Misc): Add while-no-input. X-Git-Tag: ttn-vms-21-2-B4~3185 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a50342391b233e6e32080046dd5fecd5a9654194;p=emacs.git (Event Input Misc): Add while-no-input. --- diff --git a/lispref/commands.texi b/lispref/commands.texi index 0144123ecb5..85e2953f102 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -2388,6 +2388,18 @@ The alias @code{last-input-char} exists for compatibility with Emacs version 18. @end defvar +@defmac while-no-input body... +This construct runs the @var{body} forms and returns the value +of the last one---but only if no input arrives. If any input +arrives during the execution of the @var{body} forms, it aborts +them (working much like a quit), and the @code{while-no-input} +form returns @code{nil}. + +If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil}, +arrival of input during those parts won't cause an abort until +the end of that part. +@end defmac + @defun discard-input @cindex flush input @cindex discard input