mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-18 10:10:23 +02:00
allow fluid macro bindings
* module/language/elisp/compile-tree-il.scm (define-macro!, get-macro): Allow fluid macro bindings.
This commit is contained in:
parent
e322a02bc1
commit
faf160ff1a
1 changed files with 4 additions and 2 deletions
|
@ -544,7 +544,8 @@
|
||||||
(and
|
(and
|
||||||
(symbol? sym)
|
(symbol? sym)
|
||||||
(module-defined? (resolve-interface function-slot) sym)
|
(module-defined? (resolve-interface function-slot) sym)
|
||||||
(let ((macro (module-ref (resolve-module function-slot) sym)))
|
(let* ((macro (module-ref (resolve-module function-slot) sym))
|
||||||
|
(macro (if (fluid? macro) (fluid-ref macro) macro)))
|
||||||
(and (pair? macro) (eq? (car macro) 'macro)))))
|
(and (pair? macro) (eq? (car macro) 'macro)))))
|
||||||
|
|
||||||
(define (define-macro! loc sym definition)
|
(define (define-macro! loc sym definition)
|
||||||
|
@ -555,7 +556,8 @@
|
||||||
(define (get-macro sym)
|
(define (get-macro sym)
|
||||||
(and
|
(and
|
||||||
(is-macro? sym)
|
(is-macro? sym)
|
||||||
(cdr (module-ref (resolve-module function-slot) sym))))
|
(let ((macro (module-ref (resolve-module function-slot) sym)))
|
||||||
|
(cdr (if (fluid? macro) (fluid-ref macro) macro)))))
|
||||||
|
|
||||||
;;; See if a (backquoted) expression contains any unquotes.
|
;;; See if a (backquoted) expression contains any unquotes.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue