summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c2
-rw-r--r--match.c4
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b5343dd8..6f87c46b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-09 Kaz Kylheku <kaz@kylheku.com>
+
+ * eval.c (subst_vars): Evaluate the
+ modifiers, so expressions can be used.
+
+ * match.c (subst_vars): Likewise,
+ but using txeval.
+
2012-01-07 Kaz Kylheku <kaz@kylheku.com>
Version 52
diff --git a/eval.c b/eval.c
index 325c4a00..70711b45 100644
--- a/eval.c
+++ b/eval.c
@@ -744,7 +744,7 @@ static val subst_vars(val forms, val env)
if (sym == var_s) {
val sym = second(form);
val pat = third(form);
- val modifiers = fourth(form);
+ val modifiers = eval_args(fourth(form), env, form);
val pair = lookup_var(env, sym);
if (pair) {
diff --git a/match.c b/match.c
index f13b2578..1dece256 100644
--- a/match.c
+++ b/match.c
@@ -1277,6 +1277,10 @@ static val subst_vars(val spec, val bindings, val filter)
val modifiers = fourth(elem);
val pair = assoc(sym, bindings);
+ if (modifiers)
+ modifiers = mapcar(curry_123_2(func_n3(txeval), spec, bindings),
+ modifiers);
+
if (pair) {
val str = cdr(pair);