From 7d68c07f9f0f776065519dd8afa937000b3e7ba8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 3 Feb 2017 10:22:15 -0800 Subject: Expander check for macro destination in setq forms. * eval.c (do_expand): Throw an error if the destination is a symbol macro which requires expanding. --- eval.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 15adbcaa..a2f014b9 100644 --- a/eval.c +++ b/eval.c @@ -4146,6 +4146,10 @@ static val do_expand(val form, val menv) if (!bindable(car(args))) not_bindable_warning(form, car(args)); + + if (car(args_ex) != car(args)) + eval_error(form, lit("~s: misapplied to symbol macro ~a"), sym, + car(args), nao); } if (!lookup_fun(menv, sym) && !special_operator_p(sym)) { -- cgit v1.2.3