summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-28 05:53:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-28 05:53:27 -0700
commit422a4cde1940f5d63e349e73e7241c6e2e28b253 (patch)
treed682731c232bb932850eb6a7b95f63086f432f2e /txr.1
parentd80d25d7bffd8e4dbf8a43870046bc256a12cd66 (diff)
downloadtxr-422a4cde1940f5d63e349e73e7241c6e2e28b253.tar.gz
txr-422a4cde1940f5d63e349e73e7241c6e2e28b253.tar.bz2
txr-422a4cde1940f5d63e349e73e7241c6e2e28b253.zip
New special macro parameter list parameter :form.
* eval.c (form_k): New keyword symbol variable. (bind_macro_params): Implement form_k. (eval_init): Initialize form_k. * txr.1: Documented :form parameter.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.131
1 files changed, 22 insertions, 9 deletions
diff --git a/txr.1 b/txr.1
index b3dd7451..885bdb11 100644
--- a/txr.1
+++ b/txr.1
@@ -22277,24 +22277,30 @@ and
receive
.codn nil .
-Macro parameter lists also support two special keywords, namely
-.code :env
+Macro parameter lists also supports two special keywords, namely
+.codn :env ,
+.code :whole
and
-.codn :whole .
+.codn :form .
The parameter list
-.code (:whole x :env y)
+.code (:whole x :env y :form z)
will bind parameter
.code x
to the entire
-macro parameter list, and bind parameter
+macro parameter list, bind parameter
.code y
-to the macro environment.
+to the macro environment and bind parameter
+.code z
+to the entire macro form (the original compound form used to invoke the
+macro).
+
The
+.codn :env ,
.code :whole
and
-.code :env
-notation can occur anywhere in a macro parameter list, other than
+.code :form
+notations can occur anywhere in a macro parameter list, other than
to the right of the consing dot.
.TP* "Dialect Note:"
@@ -22324,7 +22330,14 @@ they are the same and behave the same way. Thus
is treated the same way in macros as in
.code tree-bind
and related binding operators: it binds just the arguments
-to the parameter.
+to the parameter. \*(TL has the special parameter
+.code :form
+by means of which macros can access their invoking form.
+This parameter is also supported in
+.code tree-bind
+and binds to the entire
+.code tree-bind
+form.
.coNP Operator @ macro-time
.synb