summaryrefslogtreecommitdiff
path: root/doc/lispref/commands.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2014-01-06 07:36:13 +0800
committerChong Yidong <cyd@gnu.org>2014-01-06 07:36:13 +0800
commit81c7d631e9a46662d02e09cae74e24f4bb6cb20c (patch)
tree54afea46133ea78781f9a34067845cd522f26e9a /doc/lispref/commands.texi
parent0215e125539d96ec561ff693ad2b5c059e868599 (diff)
downloademacs-81c7d631e9a46662d02e09cae74e24f4bb6cb20c.tar.gz
More doc updates.
* backups.texi (Making Backups): Document backup-buffer change. * commands.texi (Defining Commands): Document the interactive-form property more carefully. Document interactive-only. * compile.texi (Compiler Errors): Copyedits. Note that the details for byte-compile-warnings are in its docstring. * customize.texi (Variable Definitions): Likewise. * files.texi (Visiting Files): Copyedits. (Testing Accessibility): Mention ACLs. Move file-modes here from File Attributes. (Truenames): Move file-equal-p here from Kinds of Files. (File Attributes): Move file-newer-than-file-p here from Testing Accessibility. (Extended Attributes): New node. Add file-extended-attributes. (Changing Files): Document set-file-extended-attributes. * minibuf.texi (Minibuffer Contents): Remove obsolete function minibuffer-completion-contents. * variables.texi (Defining Variables): Note that defvar acts always on the dynamic value.
Diffstat (limited to 'doc/lispref/commands.texi')
-rw-r--r--doc/lispref/commands.texi27
1 files changed, 20 insertions, 7 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index a118e9132a3..f9476e5e34c 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -108,13 +108,26 @@ command does.
The special form @code{interactive} turns a Lisp function into a
command. The @code{interactive} form must be located at top-level in
-the function body (usually as the first form in the body), or in the
-@code{interactive-form} property of the function symbol. When the
-@code{interactive} form is located in the function body, it does
-nothing when actually executed. Its presence serves as a flag, which
-tells the Emacs command loop that the function can be called
-interactively. The argument of the @code{interactive} form controls
-the reading of arguments for an interactive call.
+the function body, usually as the first form in the body; this applies
+to both lambda expressions (@pxref{Lambda Expressions}) and
+@code{defun} forms (@pxref{Defining Functions}). This form does
+nothing during the actual execution of the function; its presence
+serves as a flag, telling the Emacs command loop that the function can
+be called interactively. The argument of the @code{interactive} form
+specifies how the arguments for an interactive call should be read.
+
+@cindex @code{interactive-form} property
+ Alternatively, an @code{interactive} form may be specified in a
+function symbol's @code{interactive-form} property. A non-@code{nil}
+value for this property takes precedence over any @code{interactive}
+form in the function body itself. This feature is seldom used.
+
+@cindex @code{interactive-only} property
+ Sometimes, a named command is only intended to be called
+interactively, never directly from Lisp. In that case, give it a
+non-@code{nil} @code{interactive-only} property. In that case, the
+byte compiler will print a warning message if the command is called
+from Lisp.
@menu
* Using Interactive:: General rules for @code{interactive}.