aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-08-09 12:00:09 +0000
committerRichard M. Stallman2005-08-09 12:00:09 +0000
commit7d9f1aede8c8ac595bc6351a6e1257321e73c8e7 (patch)
treecaf3bbbb790cfd80ad1038f45dfada960fdf0528
parent0e15f9b48da2d0b6c2a1ddde8d616ce537b19aa0 (diff)
downloademacs-7d9f1aede8c8ac595bc6351a6e1257321e73c8e7.tar.gz
emacs-7d9f1aede8c8ac595bc6351a6e1257321e73c8e7.zip
(Event Input Misc): Update while-no-input.
-rw-r--r--lispref/commands.texi21
1 files changed, 16 insertions, 5 deletions
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.
2435@end defvar 2435@end defvar
2436 2436
2437@defmac while-no-input body... 2437@defmac while-no-input body...
2438This construct runs the @var{body} forms and returns the value 2438This construct runs the @var{body} forms and returns the value of the
2439of the last one---but only if no input arrives. If any input 2439last one---but only if no input arrives. If any input arrives during
2440arrives during the execution of the @var{body} forms, it aborts 2440the execution of the @var{body} forms, it aborts them (working much
2441them (working much like a quit), and the @code{while-no-input} 2441like a quit). The @code{while-no-input} form returns @code{nil} if
2442form returns @code{nil}. 2442aborted by a real quit, and returns @code{t} if aborted by arrival of
2443other input.
2443 2444
2444If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil}, 2445If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil},
2445arrival of input during those parts won't cause an abort until 2446arrival of input during those parts won't cause an abort until
2446the end of that part. 2447the end of that part.
2448
2449If you want to be able to distingish all possible values computed
2450by @var{body} from both kinds of abort conditions, write the code
2451like this:
2452
2453@example
2454(while-no-input
2455 (list
2456 (progn . @var{body})))
2457@end example
2447@end defmac 2458@end defmac
2448 2459
2449@defun discard-input 2460@defun discard-input