summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-24 06:32:21 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-24 06:32:21 -0800
commitbd7391ed5d5aee987c9354931e393171334da234 (patch)
tree92207d700e471a851b62d7c4124cdd258bd6ff54 /txr.1
parentfaa2840941d2e413059d09c65a404d1fe50fe21f (diff)
downloadtxr-bd7391ed5d5aee987c9354931e393171334da234.tar.gz
txr-bd7391ed5d5aee987c9354931e393171334da234.tar.bz2
txr-bd7391ed5d5aee987c9354931e393171334da234.zip
macro-time: interleave evaluation and expansion.
* eval.c (do_expand): When expanding the macro-time form, do not macro-expand it entirely and then evaluate. Rather, expand each argument form and evaluate. This way earlier forms can make global definitions which are used while macro-expanding later definitions. * txr.1: Behavior documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.113
1 files changed, 13 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 9376d51a..f01e2537 100644
--- a/txr.1
+++ b/txr.1
@@ -27262,6 +27262,19 @@ The special behavior of
is that the evaluation takes place during
the expansion phase, rather than during the evaluation phase.
+Also,
+.code macro-time
+macro-expands each
+.meta form
+and evaluates it before processing the next
+.meta form
+in the same way. Thus, for instance, if a
+.meta form
+introduces a global definition, that definition will be visible not
+only during the evaluation of a subsequent
+.metn form ,
+but also during its macro-expansion time.
+
During the expansion phase, all
.code macro-time
expressions which occur in a context