diff options
author | Robin Templeton <robin@terpri.org> | 2014-08-11 06:04:28 -0400 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-04 16:25:54 +0200 |
commit | 1174125d4091a94881a4691f26f5dad5786fcf22 (patch) | |
tree | e883812cfaccf45e0f40e605bf130d9f4a689da7 /module | |
parent | 711dc9065f58abf2f9c1aa81c4de9aa258b5d3a4 (diff) |
only evaluate top-level macro definitions
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)
* module/language/elisp/compile-tree-il.scm (defmacro): Check to see
whether toplevel? is true before compiling a macro.
Diffstat (limited to 'module')
-rw-r--r-- | module/language/elisp/compile-tree-il.scm | 7 |
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)))) |