summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-22 20:39:57 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-22 20:39:57 -0800
commitfadf6720066731a2611058121665369ce997fa57 (patch)
treea56b40059b93e6d6bf02eeea7c1a4dac291e4eee /match.c
parentaab13f6369fe8d1c1f6057ee1e0479ab8af45997 (diff)
downloadtxr-fadf6720066731a2611058121665369ce997fa57.tar.gz
txr-fadf6720066731a2611058121665369ce997fa57.tar.bz2
txr-fadf6720066731a2611058121665369ce997fa57.zip
Bugfix: @(require) eval not in proper env.
I caught this when doing a @(require (boundp 'var)). * match.c (v_require): The correct evaluation was being done here, with the value discarded, followed by an incorrect evaluation in which the TXR bindings are not visible, whose value *is* then used.
Diffstat (limited to 'match.c')
-rw-r--r--match.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/match.c b/match.c
index 54914572..9eb1a532 100644
--- a/match.c
+++ b/match.c
@@ -3625,8 +3625,7 @@ static val v_require(match_files_ctx *c)
spec_bind (specline, first_spec, c->spec);
val args = rest(first_spec);
val ret;
- (void) eval_progn_with_bindings(args, c->spec, c->bindings, specline);
- ret = eval_progn(args, make_env(c->bindings, nil, nil), specline);
+ ret = eval_progn_with_bindings(args, c->spec, c->bindings, specline);
if (!ret)
return ret;
return next_spec_k;