summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-21 19:42:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-21 19:42:14 -0700
commit705aafca215d6bf7b289f443fdebc4681776cf28 (patch)
tree41590ad1bfeb008bf6803418cd5d2068ef663146 /txr.1
parent2b717de5d7949688c7c639414a5765cbc4169f8c (diff)
downloadtxr-705aafca215d6bf7b289f443fdebc4681776cf28.tar.gz
txr-705aafca215d6bf7b289f443fdebc4681776cf28.tar.bz2
txr-705aafca215d6bf7b289f443fdebc4681776cf28.zip
Allow t symbol in macro parameter lists.
* eval.c (expand_params_rec, bind_macro_params): Handle t specially everywhere a parameter can occur. Expansion allows the syntax through without extending the environment with a t variable; binding walks over the structure without binding a variable. * stdlib/compiler.tl (expand-bind-mac-params): Likewise, handle occurrences of t, suppressing the generation of and assignment to variables, while ensuring that initializing expressions are evaluated. * tests/011/tree-bind.tl: New file. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.120
1 files changed, 20 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 66016541..7be5a547 100644
--- a/txr.1
+++ b/txr.1
@@ -39715,6 +39715,21 @@ and
.codn "(d e)" .
These compounds express nested macro parameter lists.
+Starting in \*(TX 285, the symbol
+.code t
+can be used in a macro parameter list in place of a parameter name.
+This indicates that an object is expected at that position in the
+corresponding structure, but no variable will be bound.
+For completeness, the
+.code t
+symbol may also be used for a presence-indicating variable.
+When the name of an optional parameter is specified as
+.codn t ,
+and the corresponding structure is missing, the
+.meta init-val
+expression, if present, is still evaluated under the same
+circumstances as it would if a variable were present.
+
Nested macro parameter lists recursively match the corresponding structure
in the argument object. For instance if a simple argument would capture
the structure
@@ -39846,6 +39861,11 @@ and binds to the entire
.code tree-bind
form.
+ANSI CL doesn't support the convention that the
+.code t
+symbol may appear instead of a parameter symbol to
+suppress the binding of a variable.
+
.NP* The Macro Expansion Process
The following description omits the treatment of top-level forms by