diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | eval.c | 8 |
2 files changed, 14 insertions, 2 deletions
@@ -1,5 +1,13 @@ 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 + gensym). This allows syntax like `@{1 10}` to work in quasiliterals: in + other words, modifiers on interpolated metas, on par with @{a 10}. + +2015-02-06 Kaz Kylheku <kaz@kylheku.com> + * sysif.c (abort_wrap): New static function. (sysif_init): Registered abort intrinsic. @@ -2515,11 +2515,15 @@ static val transform_op(val forms, val syms, val rg) val sym = cdr(if3(new_p, rplacd(cell, gensym(format_op_arg(vararg))), cell)); + val sym_form = if3(cdr(cdr(fi)), + cons(var_s, cons(sym, cdr(cdr(fi)))), sym); cons_bind (outsyms, outforms, transform_op(re, newsyms, rg)); - return cons(outsyms, rlcp(cons(sym, outforms), outforms)); + return cons(outsyms, rlcp(cons(sym_form, outforms), outforms)); } else if (vararg == rest_s) { + val sym_form = if3(cdr(cdr(fi)), + cons(var_s, cons(rg, cdr(cdr(fi)))), rg); cons_bind (outsyms, outforms, transform_op(re, syms, rg)); - return cons(outsyms, rlcp(cons(rg, outforms), outforms)); + return cons(outsyms, rlcp(cons(sym_form, outforms), outforms)); } } |