summaryrefslogtreecommitdiffstats
path: root/tests/011/macros-1.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-25 19:22:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-25 19:22:16 -0700
commit30d0d0fb1fa657f1b4bad642dc6ea81aee9600ba (patch)
tree43b4d5850639dcc096a9db07e94055dfa847db5c /tests/011/macros-1.txr
parent0f2ab1fc2c9dcdc181f02b7a5b50b0cdb92b01aa (diff)
downloadtxr-30d0d0fb1fa657f1b4bad642dc6ea81aee9600ba.tar.gz
txr-30d0d0fb1fa657f1b4bad642dc6ea81aee9600ba.tar.bz2
txr-30d0d0fb1fa657f1b4bad642dc6ea81aee9600ba.zip
eval: remove hack of macro deffers evaled on expansion.
* eval.c (do_expand): When a defmacro or defsymacro form is traversed, do not evaluate it, except in backward compatibility mode. Unfortunately, this breaks some code. * tests/011/macros-1.txr: A defmacro form has to be wrapped in macro-time. * tests/011/macros-2.txr: Likewise. * tests/011/mandel.txr: Likewise. * tests/012/man-or-boy.tl (defun-cbn): This macro generates a progn which which expects that a defmacro form will come into effect for the subsequent lambda in the same form. We must wrap it in macro-time to make this happen now.
Diffstat (limited to 'tests/011/macros-1.txr')
-rw-r--r--tests/011/macros-1.txr11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/011/macros-1.txr b/tests/011/macros-1.txr
index 946cbf2e..81199c12 100644
--- a/tests/011/macros-1.txr
+++ b/tests/011/macros-1.txr
@@ -1,10 +1,11 @@
@(do
(progn
- (defmacro rem-num (:env menv some-form)
- (let ((expanded (macroexpand some-form menv)))
- (if (numberp (car expanded))
- (cdr expanded)
- some-form)))
+ (macro-time
+ (defmacro rem-num (:env menv some-form)
+ (let ((expanded (macroexpand some-form menv)))
+ (if (numberp (car expanded))
+ (cdr expanded)
+ some-form))))
(prinl
(macrolet ((foo () '(1 list 42))