can be added via its symbol's property.
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.
@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.
@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}:
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.