diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-12 07:43:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-12 07:43:45 -0700 |
commit | 42854d80a361e297a1dee69bebbb6c53d79f2d19 (patch) | |
tree | ddb9c576e9d6297104d2f65c454bd0b12070dda7 /match.c | |
parent | ff7c7432e48776dbfc970d19bb81c6fe6075c117 (diff) | |
download | txr-42854d80a361e297a1dee69bebbb6c53d79f2d19.tar.gz txr-42854d80a361e297a1dee69bebbb6c53d79f2d19.tar.bz2 txr-42854d80a361e297a1dee69bebbb6c53d79f2d19.zip |
* Makefile: Install share/txr/stdlib/*.txr material.
* match.c (do_txeval): If a variable is not in the bindings, fall
back on treating it as a TXR Lisp dynamic variable. This allows
us to refer to the stdlib variable from a quasistring in a
@(load ...) directive.
* txr.c (sysroot_init): Register new variable, *txr-version*.
* share/txr/stdlib/ver.txr: New file.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1432,6 +1432,7 @@ static val do_txeval(val spec, val form, val bindings, val allow_unbound) { val ret = nil; uw_mark_frame; + uses_or2; uw_catch_begin (cons(query_error_s, nil), exc_sym, exc); if (!form) @@ -1441,7 +1442,7 @@ static val do_txeval(val spec, val form, val bindings, val allow_unbound) if (!form) { ret = form; } else if (bindable(form)) { - val binding = assoc(form, bindings); + val binding = or2(assoc(form, bindings), lookup_var(nil, form)); if (!binding) { if (allow_unbound) ret = noval_s; |