1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 22:12:25 +02:00

use existing bindings record for defmacro

* module/language/elisp/compile-tree-il.scm (compile-pair): Use existing
  bindings record during macro definition.
This commit is contained in:
Brian Templeton 2010-06-17 20:25:42 -04:00
parent e609a73399
commit 88698140c0

View file

@ -859,8 +859,7 @@
((defmacro ,name ,args . ,body)
(if (not (symbol? name))
(report-error loc "expected symbol as macro name" name)
(let* ((tree-il (with-fluids ((bindings-data (make-bindings)))
(compile-lambda loc args body)))
(let* ((tree-il (compile-lambda loc args body))
(object (compile tree-il #:from 'tree-il #:to 'value)))
(define-macro! loc name object)
(make-const loc name))))