X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ecbfc7e99c5fa7c7147218b456262ea784b66025..25afa2cfe4d3e9011a0ebbbf17173393758b00e4:/lispref/commands.texi?ds=sidebyside diff --git a/lispref/commands.texi b/lispref/commands.texi index 803a7c51ef..353a7436c2 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004 -@c Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003, +@c 2004, 2005 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/commands @node Command Loop, Keymaps, Minibuffers, Top @@ -350,6 +350,11 @@ Prompt. @item F A file name. The file need not exist. Completion, Default, Prompt. +@item G +A file name. The file need not exist. If the user enters just a +directory name, then the value is just that directory name, with no +file name within the directory added. Completion, Default, Prompt. + @item i An irrelevant argument. This code always supplies @code{nil} as the argument's value. No I/O. @@ -360,8 +365,9 @@ until a command (or undefined command) is found in the current key maps. The key sequence argument is represented as a string or vector. The cursor does not move into the echo area. Prompt. -If the key sequence is a down-event, the following up-event is discarded, -but can be read via the @code{U} code character. +If @samp{k} reads a key sequence that ends with a down-event, it also +reads and discards the following up-event. You can get access to that +up-event with the @samp{U} code character. This kind of input is used by commands such as @code{describe-key} and @code{global-set-key}. @@ -420,9 +426,10 @@ the string.) Other characters that normally terminate a symbol (e.g., parentheses and brackets) do not do so here. Prompt. @item U -A key sequence or @code{nil}. May be used after a @code{k} or @code{K} -argument to get the up-event that was discarded in case the key -sequence read for that argument was a down-event. No I/O. +A key sequence or @code{nil}. Can be used after a @samp{k} or +@samp{K} argument to get the up-event that was discarded (if any) +after @samp{k} or @samp{K} read a down-event. If no up-event has been +discarded, @samp{U} provides @code{nil} as the argument. No I/O. @item v A variable declared to be a user option (i.e., satisfying the @@ -437,8 +444,9 @@ Minibuffer}. Prompt. @item X @cindex evaluated expression argument -A Lisp form is read as with @kbd{x}, but then evaluated so that its -value becomes the argument for the command. Prompt. +A Lisp form's value. @samp{X} reads as @samp{x} does, then evaluates +the form so that its value becomes the argument for the command. +Prompt. @item z A coding system name (a symbol). If the user enters null input, the @@ -1765,7 +1773,7 @@ Return the window that @var{position} is in. @defun posn-area position Return the window area recorded in @var{position}. It returns @code{nil} when the event occurred in the text area of the window; otherwise, it -is a symbol identifying the area in which the the event occurred. +is a symbol identifying the area in which the event occurred. @end defun @defun posn-point position @@ -2427,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