From 9e77cfa7e863eb9320867749967a3b39fc54629c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 18 Nov 2016 06:23:11 -0800 Subject: Bugfix in expansion-time progn reduction. This was exposed by causing an issue in the multi-pass expansion strategy used in tagbody which shields macro forms from a global macro using a local macro. * eval.c (expand_progn): When calling constantp, pass the macro environment, as required, rather than nil. This was causing (go ...) forms in tagbody to be expanded in the global environment using the global go macro which unconditionally throws an error about an undefined label, rather than using the harmless local go macrolet. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index 2bf3d694..b34b364f 100644 --- a/eval.c +++ b/eval.c @@ -2576,7 +2576,7 @@ static val expand_progn(val form, val menv) return rlcp(cdr(ex_f), form); } - if ((symbolp(ex_f) || constantp(ex_f, nil)) && ex_r) + if ((symbolp(ex_f) || constantp(ex_f, menv)) && ex_r) return rlcp(ex_r, form); if (ex_f == f && ex_r == r) -- cgit v1.2.3