summaryrefslogtreecommitdiff
path: root/lispref
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2004-01-16 00:43:54 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2004-01-16 00:43:54 +0000
commit462d9c4387b6ebf9af719991439283bb1d085e8b (patch)
treeff70a6bbd3e3c81ab354fba37ee8476a0d024c37 /lispref
parentc1bfdd54476490681e10a8eb935e7ed91449dc8c (diff)
downloademacs-462d9c4387b6ebf9af719991439283bb1d085e8b.tar.gz
(Defining Macros): Update description of `declare', which now is a macro.
(Wrong Time): Fix typos.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/macros.texi25
1 files changed, 18 insertions, 7 deletions
diff --git a/lispref/macros.texi b/lispref/macros.texi
index b28797b06c9..53f082cf46c 100644
--- a/lispref/macros.texi
+++ b/lispref/macros.texi
@@ -210,10 +210,11 @@ called interactively.
which can specify how @key{TAB} should indent macro calls, and how to
step through them for Edebug.
-@defspec declare @var{specs}...
-This special form is used at top level in a macro definition to
-specify various additional information about it. Two kinds of
-specification are currently supported:
+@anchor{Definition of declare}
+@defmac declare @var{specs}@dots{}
+A @code{declare} form is used in a macro definition to specify various
+additional information about it. Two kinds of specification are
+currently supported:
@table @code
@item (edebug @var{edebug-form-spec})
@@ -224,7 +225,17 @@ Specify how to step through macro calls for Edebug.
Specify how to indent calls to this macro. @xref{Indenting Macros},
for more details.
@end table
-@end defspec
+
+A @code{declare} form only has its special effect in the body of a
+@code{defmacro} form if it immediately follows the documentation
+string, if present, or the argument list otherwise. (Strictly
+speaking, @emph{several} @code{declare} forms can follow the
+documentation string or argument list, but since a @code{declare} form
+can have several @var{specs}, they can always be combined into a
+single form.) When used at other places in a @code{defmacro} form, or
+outside a @code{defmacro} form, @code{declare} just returns @code{nil}
+without evaluating any @var{specs}.
+@end defmac
No macro absolutely needs a @code{declare} form, because that form
has no effect on how the macro expands, on what the macro means in the
@@ -356,9 +367,9 @@ trouble, and rules to follow to avoid trouble.
@node Wrong Time
@subsection Wrong Time
- The most common problem in writing macros is doing too some of the
+ The most common problem in writing macros is doing some of the
real work prematurely---while expanding the macro, rather than in the
-expansion itself. For instance, one real package had this nmacro
+expansion itself. For instance, one real package had this macro
definition:
@example