diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | eval.c | 14 |
2 files changed, 14 insertions, 12 deletions
@@ -1,5 +1,17 @@ 2015-02-06 Kaz Kylheku <kaz@kylheku.com> + * eval.c (subst_vars): Bugfix. When an ordinary variable + occurs in the quasi syntax (which is the result of substitution + of metanums like @1 by the op macro), if that variable + evaluated to a list form, it was not being converted to + a string. The resulting form was then examined for variable + substitutions as if it were part of the quasi syntax. + This was introduced at the same time as the feature of being + able to use metanums in a quasiliteral (Feb 13, 2012: + last change before Version 57). + +2015-02-06 Kaz Kylheku <kaz@kylheku.com> + * eval.c (transform_op): When expanding @rest and metanums like @1, @2, preserve the (sys:var X args ..) structure if there are args (but of course with X replaced by the appropriate @@ -2071,18 +2071,8 @@ static val subst_vars(val forms, val env) continue; } } else if (bindable(form)) { - val pair = lookup_var(env, form); - - if (pair) { - val str = cdr(pair); - - if (!stringp(str) && !listp(str)) - str = format(nil, lit("~a"), str, nao); - - forms = cons(str, rest(forms)); - continue; - } - eval_error(forms, lit("unbound variable ~s"), form, nao); + forms = cons(cons(var_s, cons(form, nil)), cdr(forms)); + continue; } iter = list_collect(iter, form); |