diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-05 10:24:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-05 10:24:06 -0700 |
commit | b6042a045a4e35da0821c0a7c8146d2bc90b175f (patch) | |
tree | 8371f27a8434b7ed504e08437bc33232fb345c85 | |
parent | a25191dbcc8c4bfb377ec816f1b0c4151a98d12a (diff) | |
download | txr-b6042a045a4e35da0821c0a7c8146d2bc90b175f.tar.gz txr-b6042a045a4e35da0821c0a7c8146d2bc90b175f.tar.bz2 txr-b6042a045a4e35da0821c0a7c8146d2bc90b175f.zip |
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.
-rwxr-xr-x | tags.tl | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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) |