Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d9f1aed
Commit
7d9f1aed
authored
Aug 09, 2005
by
Richard M. Stallman
Browse files
(Event Input Misc): Update while-no-input.
parent
0e15f9b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
lispref/commands.texi
lispref/commands.texi
+16
-5
No files found.
lispref/commands.texi
View file @
7d9f1aed
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment