Don't unwrap syntatic closures in top-level defines by default.

This commit is contained in:
Alex Shinn 2012-10-01 22:56:21 +09:00
parent 7b1760ef82
commit 2c5522dfff
2 changed files with 6 additions and 0 deletions

2
eval.c
View file

@ -784,7 +784,9 @@ static sexp analyze_define (sexp ctx, sexp x) {
sexp_push(ctx, sexp_lambda_defs(sexp_env_lambda(env)), tmp);
res = SEXP_VOID;
} else {
#if SEXP_USE_UNWRAPPED_TOPLEVEL_BINDINGS
if (sexp_synclop(name)) name = sexp_synclo_expr(name);
#endif
sexp_env_cell_define(ctx, env, name, SEXP_VOID, &varenv);
if (sexp_pairp(sexp_cadr(x))) {
tmp = sexp_cons(ctx, sexp_cdadr(x), sexp_cddr(x));

View file

@ -404,6 +404,10 @@
#endif
#endif
#if SEXP_USE_UNWRAPPED_TOPLEVEL_BINDINGS
#define SEXP_USE_UNWRAPPED_TOPLEVEL_BINDINGS 0
#endif
#ifndef SEXP_USE_EXTENDED_FCALL
#define SEXP_USE_EXTENDED_FCALL (!SEXP_USE_NO_FEATURES)
#endif