From b6042a045a4e35da0821c0a7c8146d2bc90b175f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 5 Apr 2020 10:24:06 -0700 Subject: tags: completely restore package list for each file. * tags.tl (in-anon-package): Instead of the unwind-protect which deletes the anonymous package, let us save and restore the *package-alist* by dynamically binding it to its current value. This will roll back packages that were created by fake-load. --- tags.tl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tags.tl b/tags.tl index 720a60a8..a5088301 100755 --- a/tags.tl +++ b/tags.tl @@ -66,13 +66,11 @@ (defmacro in-anon-package (. body) (with-gensyms (pkg) - ^(let* ((,pkg (make-package "anon")) + ^(let* ((*package-alist* *package-alist*) + (,pkg (make-package "anon")) (*package* ,pkg)) - (unwind-protect - (progn - (set-package-fallback-list *package* '(:usr)) - ,*body) - (delete-package ,pkg))))) + (set-package-fallback-list *package* '(:usr)) + ,*body))) (defmacro with-tag-shorthand-macro ((name-sym path-var lines-var obj-var) . body) -- cgit v1.2.3