summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-09-03 07:28:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-09-03 07:28:46 -0700
commite5d7d45d81f1529886867e4331c73b8d64df3463 (patch)
tree60f9cc1c6f97f3ec0a305244fbc847f4d25f18f6 /socket.c
parente55cc6a24144875732b16ff526ed7b6faea7c67a (diff)
downloadtxr-e5d7d45d81f1529886867e4331c73b8d64df3463.tar.gz
txr-e5d7d45d81f1529886867e4331c73b8d64df3463.tar.bz2
txr-e5d7d45d81f1529886867e4331c73b8d64df3463.zip
load: scope change for load hooks.
* eval.c (run_load_hooks): Install the given environment as dyn_env temporarily, and don't restore it until after calling the hooks. Thus the specified environment is now in effect when running the hooks. Also, pass nil to lookup_var, in the spirit of the previous commit. The fact that load_dyn_env had to be passed to lookup_var previously, which is an anti-pattern, tells us that this scoping rule was a code smell. If the *load-hooks* value comes from a given dynamic environment, then those functions should be executed in exactly that environment. * txr.1: Documentation updated.
Diffstat (limited to 'socket.c')
0 files changed, 0 insertions, 0 deletions