summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-01-23 22:38:42 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-01-23 22:38:42 -0800
commit44c7977c3fec3bcf4fc33bbd85cf98dc4eeba345 (patch)
tree9bde5e59ce92652ce45615f74cf87e0d4f7eac87
parent5e58561b962d40524a3cfe37764ef96065ada3f0 (diff)
downloadtxr-44c7977c3fec3bcf4fc33bbd85cf98dc4eeba345.tar.gz
txr-44c7977c3fec3bcf4fc33bbd85cf98dc4eeba345.tar.bz2
txr-44c7977c3fec3bcf4fc33bbd85cf98dc4eeba345.zip
diagnose (:whole . blah) as dangling :whole.
* eval.c (bind_macro_params): Test that the rest of the param list after the keyword is consp, not just non-nil.
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 3a5cd547..015ee9af 100644
--- a/eval.c
+++ b/eval.c
@@ -1104,7 +1104,7 @@ static val bind_macro_params(val env, val menv, val params, val form,
val bform = if3(param == whole_k, whole,
if3(param == form_k,
ctx_form, menv));
- if (!next)
+ if (!consp(next))
eval_error(ctx_form, lit("~s: dangling ~s in param list"),
car(ctx_form), param, nao);
nparam = car(next);