diff options
| author | Lars Ingebrigtsen | 2016-04-29 00:17:50 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-05-01 19:27:07 +0200 |
| commit | cf33ae0c1286efb7acee8b1c0076048d5d3e3543 (patch) | |
| tree | 24a53cecc30d9d0e224593d491a79debfbe58d77 /src | |
| parent | 0a14d84150e7728ff1461d3f25b1b5bdc6e0cf08 (diff) | |
| download | emacs-cf33ae0c1286efb7acee8b1c0076048d5d3e3543.tar.gz emacs-cf33ae0c1286efb7acee8b1c0076048d5d3e3543.zip | |
Clarify the `interactive' doc string slightly
* src/callint.c (Finteractive): Clarify the doc string slightly
(bug#14577).
(cherry picked from commit cd993be60da2d12db0d390001373d486c1091c47)
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/callint.c b/src/callint.c index 3bcf2c8476b..e56f7cd1b84 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -41,20 +41,24 @@ For example, write | |||
| 41 | (defun foo (arg buf) "Doc string" (interactive "P\\nbbuffer: ") .... ) | 41 | (defun foo (arg buf) "Doc string" (interactive "P\\nbbuffer: ") .... ) |
| 42 | to make ARG be the raw prefix argument, and set BUF to an existing buffer, | 42 | to make ARG be the raw prefix argument, and set BUF to an existing buffer, |
| 43 | when `foo' is called as a command. | 43 | when `foo' is called as a command. |
| 44 | The "call" to `interactive' is actually a declaration rather than a function; | 44 | |
| 45 | it tells `call-interactively' how to read arguments | 45 | The "call" to `interactive' is actually a declaration rather than a |
| 46 | to pass to the function. | 46 | function; it tells `call-interactively' how to read arguments to pass |
| 47 | When actually called, `interactive' just returns nil. | 47 | to the function. When actually called, `interactive' just returns |
| 48 | 48 | nil. | |
| 49 | Usually the argument of `interactive' is a string containing a code letter | 49 | |
| 50 | followed optionally by a prompt. (Some code letters do not use I/O to get | 50 | Usually the argument of `interactive' is a string containing a code |
| 51 | the argument and do not use prompts.) To get several arguments, concatenate | 51 | letter followed optionally by a prompt. (Some code letters do not |
| 52 | the individual strings, separating them by newline characters. | 52 | use I/O to get the argument and do not use prompts.) To pass several |
| 53 | Prompts are passed to format, and may use % escapes to print the | 53 | arguments to the command, concatenate the individual strings, |
| 54 | separating them by newline characters. | ||
| 55 | |||
| 56 | Prompts are passed to `format', and may use % escapes to print the | ||
| 54 | arguments that have already been read. | 57 | arguments that have already been read. |
| 55 | If the argument is not a string, it is evaluated to get a list of | 58 | If the argument is not a string, it is evaluated to get a list of |
| 56 | arguments to pass to the function. | 59 | arguments to pass to the command. |
| 57 | Just `(interactive)' means pass no args when calling interactively. | 60 | Just `(interactive)' means pass no arguments to the command when |
| 61 | calling interactively. | ||
| 58 | 62 | ||
| 59 | Code letters available are: | 63 | Code letters available are: |
| 60 | a -- Function name: symbol with a function definition. | 64 | a -- Function name: symbol with a function definition. |
| @@ -99,7 +103,7 @@ If the string begins with `^' and `shift-select-mode' is non-nil, | |||
| 99 | Emacs first calls the function `handle-shift-selection'. | 103 | Emacs first calls the function `handle-shift-selection'. |
| 100 | You may use `@', `*', and `^' together. They are processed in the | 104 | You may use `@', `*', and `^' together. They are processed in the |
| 101 | order that they appear, before reading any arguments. | 105 | order that they appear, before reading any arguments. |
| 102 | usage: (interactive &optional ARGS) */ | 106 | usage: (interactive &optional ARG-DESCRIPTOR) */ |
| 103 | attributes: const) | 107 | attributes: const) |
| 104 | (Lisp_Object args) | 108 | (Lisp_Object args) |
| 105 | { | 109 | { |