Fix lexical and dynamic binding
This commit is contained in:
+2
-2
@@ -252,7 +252,7 @@ void set_lexical_variable(LispVal *name, LispVal *value) {
|
||||
abort();
|
||||
}
|
||||
if (DYNAMIC_SYMBOL_P(name)) {
|
||||
SET_SYMBOL_VALUE(name, value);
|
||||
push_dynamic_binding(name, value);
|
||||
} else {
|
||||
Vlexical_environment = Fplist_put(Vlexical_environment, name, value);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void new_lexical_variable(LispVal *name, LispVal *value) {
|
||||
abort();
|
||||
}
|
||||
if (DYNAMIC_SYMBOL_P(name)) {
|
||||
SET_SYMBOL_VALUE(name, value);
|
||||
push_dynamic_binding(name, value);
|
||||
} else {
|
||||
Vlexical_environment = CONS(name, CONS(value, Vlexical_environment));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user