1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 03:30:24 +02:00

only evaluate top-level macro definitions

(Best-ability ChangeLog annotation added by Christine Lemmer-Webber.)

* module/language/elisp/compile-tree-il.scm (defmacro): Check to see
  whether toplevel? is true before compiling a macro.
This commit is contained in:
Robin Templeton 2014-08-11 06:04:28 -04:00 committed by Christine Lemmer-Webber
parent 05ea13e910
commit 31761a6221
No known key found for this signature in database
GPG key ID: 4BC025925FF8F4D3

View file

@ -786,9 +786,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))))