diff options
| author | Richard M. Stallman | 2006-02-19 23:37:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-02-19 23:37:38 +0000 |
| commit | 8b77e9ed72d2b4c7f5e9b1eb775e7db45992ebcd (patch) | |
| tree | 4c15f29f0e5871b6a8b4af2b264c6e76c8b8e181 /lispref | |
| parent | d7fb7d7fec5a8ffdc59bfc540b1b214fe577c431 (diff) | |
| download | emacs-8b77e9ed72d2b4c7f5e9b1eb775e7db45992ebcd.tar.gz emacs-8b77e9ed72d2b4c7f5e9b1eb775e7db45992ebcd.zip | |
(Using Interactive): Add xrefs about reading input.
Clarify remarks about that moving point and mark.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/commands.texi | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lispref/commands.texi b/lispref/commands.texi index 7a2cdb8edf9..aa05e0a48f2 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi | |||
| @@ -150,18 +150,21 @@ It may be omitted or @code{nil}; then the command is called with no | |||
| 150 | arguments. This leads quickly to an error if the command requires one | 150 | arguments. This leads quickly to an error if the command requires one |
| 151 | or more arguments. | 151 | or more arguments. |
| 152 | 152 | ||
| 153 | |||
| 153 | @item | 154 | @item |
| 154 | It may be a Lisp expression that is not a string; then it should be a | 155 | It may be a Lisp expression that is not a string; then it should be a |
| 155 | form that is evaluated to get a list of arguments to pass to the | 156 | form that is evaluated to get a list of arguments to pass to the |
| 156 | command. | 157 | command. Usually this form will call various functions to read input |
| 158 | from the user, most often through the minibuffer (@pxref{Minibuffer}) | ||
| 159 | or directly from the keyboard (@pxref{Reading Input}). | ||
| 157 | @cindex argument evaluation form | 160 | @cindex argument evaluation form |
| 158 | 161 | ||
| 159 | If this expression reads keyboard input (this includes using the | 162 | Providing point or the mark as an argument value is also common, but |
| 160 | minibuffer), keep in mind that the integer value of point or the mark | 163 | if you do this @emph{and} read input (whether using the minibuffer or |
| 161 | before reading input may be incorrect after reading input. This is | 164 | not), be sure to get the integer values of point or the mark after |
| 162 | because the current buffer may be receiving subprocess output; | 165 | reading. The current buffer may be receiving subprocess output; if |
| 163 | if subprocess output arrives while the command is waiting for input, | 166 | subprocess output arrives while the command is waiting for input, it |
| 164 | it could relocate point and the mark. | 167 | could relocate point and the mark. |
| 165 | 168 | ||
| 166 | Here's an example of what @emph{not} to do: | 169 | Here's an example of what @emph{not} to do: |
| 167 | 170 | ||
| @@ -172,8 +175,8 @@ Here's an example of what @emph{not} to do: | |||
| 172 | @end smallexample | 175 | @end smallexample |
| 173 | 176 | ||
| 174 | @noindent | 177 | @noindent |
| 175 | Here's how to avoid the problem, by examining point and the mark only | 178 | Here's how to avoid the problem, by examining point and the mark after |
| 176 | after reading the keyboard input: | 179 | reading the keyboard input: |
| 177 | 180 | ||
| 178 | @smallexample | 181 | @smallexample |
| 179 | (interactive | 182 | (interactive |