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 | c0d9743a31ac1fcb4cb6231237b2a8a253f49d1d (patch) | |
tree | 8371f27a8434b7ed504e08437bc33232fb345c85 | |
parent | a6c764c7291979415dc95acff2690df7ca157636 (diff) | |
download | txr-c0d9743a31ac1fcb4cb6231237b2a8a253f49d1d.tar.gz txr-c0d9743a31ac1fcb4cb6231237b2a8a253f49d1d.tar.bz2 txr-c0d9743a31ac1fcb4cb6231237b2a8a253f49d1d.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) |