summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index badd5347..414918aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-01-30 Kaz Kylheku <kaz@kylheku.com>
+
+ * eval.c (expand_op): Fix broken do operator. In the case of the do
+ operator, we must feed the entire form to the expander, not the
+ individual forms. That is to say (do operator arg) must expand the
+ form (operator arg), whereas (op fun arg) just expands the forms fun
+ and arg individually.
+
2014-01-29 Kaz Kylheku <kaz@kylheku.com>
Version 77
diff --git a/eval.c b/eval.c
index 142776fa..1d8c5ce4 100644
--- a/eval.c
+++ b/eval.c
@@ -1648,7 +1648,7 @@ static val supplement_op_syms(val ssyms, val max)
static val expand_op(val sym, val body)
{
- val body_ex = expand_forms(body);
+ val body_ex = if3(sym == op_s, expand_forms(body), expand(body));
val rest_gensym = gensym(lit("rest-"));
cons_bind (syms, body_trans, transform_op(body_ex, nil, rest_gensym));
val ssyms = sort(syms, func_n2(lt), car_f);