From: Richard M. Stallman Date: Tue, 9 Aug 2005 12:00:09 +0000 (+0000) Subject: (Event Input Misc): Update while-no-input. X-Git-Tag: emacs-pretest-22.0.90~7696 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7d9f1aede8c8ac595bc6351a6e1257321e73c8e7;p=emacs.git (Event Input Misc): Update while-no-input. --- diff --git a/lispref/commands.texi b/lispref/commands.texi index 5ded722155c..47025fb0c28 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -2435,15 +2435,26 @@ 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}. +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). The @code{while-no-input} form returns @code{nil} if +aborted by a real quit, and returns @code{t} if aborted by arrival of +other input. 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. + +If you want to be able to distingish all possible values computed +by @var{body} from both kinds of abort conditions, write the code +like this: + +@example +(while-no-input + (list + (progn . @var{body}))) +@end example @end defmac @defun discard-input