From e3ae32a75df126d41f782480a8c2131fba58ecef Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 17 Apr 2025 20:32:04 -0700 Subject: 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. --- autoload.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3