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
c3aaf1d7
Commit
c3aaf1d7
authored
Oct 15, 2008
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Defining Commands, Using Interactive): The interactive-form of a function
can be added via its symbol's property.
parent
2c30e468
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+5
-0
doc/lispref/commands.texi
doc/lispref/commands.texi
+7
-1
etc/NEWS
etc/NEWS
+2
-0
No files found.
doc/lispref/ChangeLog
View file @
c3aaf1d7
2008
-
10
-
15
Eli
Zaretskii
<
eliz
@
gnu
.
org
>
*
internals
.
texi
(
Writing
Emacs
Primitives
):
The
interactive
spec
of
a
primitive
can
be
a
Lisp
form
.
*
markers
.
texi
(
The
Mark
):
Document
the
`
lambda
' and `(only . OLD)'
values
of
transient
-
mark
-
mode
.
Document
handle
-
shift
-
selection
.
*
commands
.
texi
(
Using
Interactive
,
Interactive
Codes
):
Document
`^
'.
(Interactive Examples): Show an example of `^'
.
(
Key
Sequence
Input
):
Document
this
-
command
-
keys
-
shift
-
translated
.
(
Defining
Commands
,
Using
Interactive
):
The
interactive
-
form
of
a
function
can
be
added
via
its
symbol
's property.
* positions.texi (List Motion): beginning-of-defun-function can
now accept an argument.
...
...
doc/lispref/commands.texi
View file @
c3aaf1d7
...
...
@@ -103,7 +103,8 @@ command does.
@cindex interactive function
A Lisp function becomes a command when its body contains, at top
level, a form that calls the special form @code{interactive}. This
level, a form that calls the special form @code{interactive}, or if
the function's symbol has an @code{interactive-form} property. This
form does nothing when actually executed, but its presence serves as a
flag to indicate that interactive calling is permitted. Its argument
controls the reading of arguments for an interactive call.
...
...
@@ -141,6 +142,11 @@ the function is called, all its body forms including the
@code{interactive} form are executed, but at this time
@code{interactive} simply returns @code{nil} without even evaluating its
argument.
@cindex @code{interactive-form}, function property
An interactive form can be added to a function post-facto via the
@code{interactive-form} property of the function's symbol.
@xref{Symbol Plists}.
@end defspec
There are three possibilities for the argument @var{arg-descriptor}:
...
...
etc/NEWS
View file @
c3aaf1d7
...
...
@@ -1169,10 +1169,12 @@ undefined functions.
handle-shift-selection if shift-select-mode is non-nil, before reading
the command arguments. This is used for shift-selection (see above).
+++
*** Built-in functions can now have an interactive specification that
is not a prompt string. If the `intspec' parameter of a `DEFUN'
starts with a `(', the string is evaluated as a Lisp form.
+++
*** The interactive-form of a function can be added post-facto via the
`interactive-form' symbol property. Mostly useful to add complex
interactive forms to subroutines.
...
...
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