Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f9257eed
Commit
f9257eed
authored
Mar 22, 2009
by
Alan Mackenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Finteractive): Clarify the doc string - even promptless elements need \n
separators.
parent
bc9b2b5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+5
-0
src/callint.c
src/callint.c
+8
-7
No files found.
doc/lispref/ChangeLog
View file @
f9257eed
2009-03-22 Alan Mackenzie <acm@muc.de>
* commands.texi (Using Interactive): Clarify string argument to
`interactive' - even promptless elements need \n separators.
2009-03-18 Chong Yidong <cyd@stupidchicken.com>
* minibuf.texi (Completion Styles): New node.
...
...
src/callint.c
View file @
f9257eed
...
...
@@ -68,18 +68,19 @@ static Lisp_Object callint_message;
DEFUN
(
"interactive"
,
Finteractive
,
Sinteractive
,
0
,
UNEVALLED
,
0
,
doc
:
/* Specify a way of parsing arguments for interactive use of a function.
For example, write
(defun foo (arg) "Doc string" (interactive "p") ...use arg...)
to make ARG be the prefix argument when `foo' is called as a command.
(defun foo (arg buf) "Doc string" (interactive "P\\nbbuffer: ") .... )
to make ARG be the raw prefix argument, and set BUF to an existing buffer,
when `foo' is called as a command.
The "call" to `interactive' is actually a declaration rather than a function;
it tells `call-interactively' how to read arguments
to pass to the function.
When actually called, `interactive' just returns nil.
T
he argument of `interactive' is
usually
a string containing a code letter
followed by a prompt. (Some code letters do not use I/O to get
the argument and do not
need
prompts.) To
prompt for multiple arguments,
give a code letter, its prompt, a newline, and another code letter, etc
.
Prompts are passed to format, and may use % escapes to print the
Usually t
he argument of `interactive' is a string containing a code letter
followed
optionally
by a prompt. (Some code letters do not use I/O to get
the argument and do not
use
prompts.) To
get several arguments, concatenate
the individual strings, separating them by newline characters
.
Prompts are passed to format, and may use % escapes to print the
arguments that have already been read.
If the argument is not a string, it is evaluated to get a list of
arguments to pass to the function.
...
...
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