summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-04-17 20:32:04 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-04-17 20:32:04 -0700
commite3ae32a75df126d41f782480a8c2131fba58ecef (patch)
treea7e5b986922bd614a844f4d3fddb589f9a4f473d
parent05477c10a764b0deb160708eb91587695d965a49 (diff)
downloadtxr-e3ae32a75df126d41f782480a8c2131fba58ecef.tar.gz
txr-e3ae32a75df126d41f782480a8c2131fba58ecef.tar.bz2
txr-e3ae32a75df126d41f782480a8c2131fba58ecef.zip
autoload: reset expand hook while loading.
* autoload.c (autload_try): Just like we set *package* and *package-alist* to sane values before loading, we must also reset *expand-hook* to nil. We would not want autoloads to be processed with some custome expansion that breaks them. This matters in the rare case when they are being loaded from .tl sources rather than .tlo.
-rw-r--r--autoload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload.c b/autoload.c
index 11d2beac..c24b3a14 100644
--- a/autoload.c
+++ b/autoload.c
@@ -1134,6 +1134,7 @@ static val autoload_try(al_ns_t ns, val sym)
dyn_env = make_env(nil, nil, dyn_env);
env_vbind(dyn_env, package_s, system_package);
env_vbind(dyn_env, package_alist_s, packages);
+ env_vbind(dyn_env, expand_hook, nil);
opt_compat = 0;
funcall(fun);
opt_compat = saved_compat;