mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-09 14:07:34 +02:00
Fixing macro environment to be the evaluation, not binding
environment, in let-syntax. The difference arises when the same binding is inside and outside the let-syntax. Patch from Zhang Meng.
This commit is contained in:
parent
c0b257db25
commit
df116bb779
1 changed files with 1 additions and 1 deletions
2
eval.c
2
eval.c
|
@ -828,7 +828,7 @@ static sexp analyze_bind_syntax (sexp ls, sexp eval_ctx, sexp bind_ctx) {
|
|||
else
|
||||
mac = sexp_eval(eval_ctx, sexp_cadar(ls), NULL);
|
||||
if (sexp_procedurep(mac))
|
||||
mac = sexp_make_macro(eval_ctx, mac, sexp_context_env(bind_ctx));
|
||||
mac = sexp_make_macro(eval_ctx, mac, sexp_context_env(eval_ctx));
|
||||
if (!(sexp_macrop(mac)||sexp_corep(mac))) {
|
||||
res = (sexp_exceptionp(mac) ? mac
|
||||
: sexp_compile_error(eval_ctx, "non-procedure macro", mac));
|
||||
|
|
Loading…
Add table
Reference in a new issue