summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/txr/stdlib/compiler.tl5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 0e0f3f4f..e56dea66 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -334,6 +334,8 @@
(defvarl assumed-fun)
+(defvar *in-compilation-unit* nil)
+
(defvar *dedup*)
(defvar *unchecked-calls*)
@@ -2219,7 +2221,8 @@
(defmacro usr:with-compilation-unit (. body)
(with-gensyms (rec)
- ^(let* ((,rec sys:*load-recursive*)
+ ^(let* ((,rec *in-compilation-unit*)
+ (*in-compilation-unit* t)
(sys:*load-recursive* t)
(*dedup* (or *dedup* (hash))))
(unwind-protect