summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/language/elisp/compile-tree-il.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm
index 5c08c0933..57d9f0b83 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -785,9 +785,10 @@
args
body))))
(make-const loc name))))
- (with-native-target
- (lambda ()
- (compile tree-il #:from 'tree-il #:to 'value)))
+ (when (fluid-ref toplevel?)
+ (with-native-target
+ (lambda ()
+ (compile tree-il #:from 'tree-il #:to 'value))))
tree-il)))
(else (report-error loc "bad defmacro" args))))