1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-03 08:10:31 +02:00

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.
This commit is contained in:
Robin Templeton 2014-08-11 06:04:28 -04:00 committed by Christopher Allan Webber
parent 4c6ef2b4cb
commit 93b8b53c65

View file

@ -782,7 +782,8 @@
args
body))))
(make-const loc name))))
(compile tree-il #:from 'tree-il #:to 'value)
(when (fluid-ref toplevel?)
(compile tree-il #:from 'tree-il #:to 'value))
tree-il)))
(else (report-error loc "bad defmacro" args))))