mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-18 02:00:20 +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:
parent
e609a73399
commit
88698140c0
1 changed files with 1 additions and 2 deletions
|
@ -859,8 +859,7 @@
|
||||||
((defmacro ,name ,args . ,body)
|
((defmacro ,name ,args . ,body)
|
||||||
(if (not (symbol? name))
|
(if (not (symbol? name))
|
||||||
(report-error loc "expected symbol as macro name" name)
|
(report-error loc "expected symbol as macro name" name)
|
||||||
(let* ((tree-il (with-fluids ((bindings-data (make-bindings)))
|
(let* ((tree-il (compile-lambda loc args body))
|
||||||
(compile-lambda loc args body)))
|
|
||||||
(object (compile tree-il #:from 'tree-il #:to 'value)))
|
(object (compile tree-il #:from 'tree-il #:to 'value)))
|
||||||
(define-macro! loc name object)
|
(define-macro! loc name object)
|
||||||
(make-const loc name))))
|
(make-const loc name))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue