mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 12:10:28 +02:00
(define-module): Return the new module. (process-define-module): Use
`spec' instead of `module-name' when getting the syntax transformer.
This commit is contained in:
parent
bab34d2a6f
commit
25afac9812
1 changed files with 4 additions and 2 deletions
|
@ -1701,7 +1701,7 @@
|
||||||
spec))
|
spec))
|
||||||
(set-module-transformer!
|
(set-module-transformer!
|
||||||
module
|
module
|
||||||
(module-ref interface (car (last-pair module-name))
|
(module-ref interface (car (last-pair spec))
|
||||||
#f)))
|
#f)))
|
||||||
(loop (cddr kws)
|
(loop (cddr kws)
|
||||||
(cons interface reversed-interfaces)
|
(cons interface reversed-interfaces)
|
||||||
|
@ -2598,7 +2598,9 @@
|
||||||
(defmacro define-module args
|
(defmacro define-module args
|
||||||
`(eval-case
|
`(eval-case
|
||||||
((load-toplevel)
|
((load-toplevel)
|
||||||
(set-current-module (process-define-module ',args)))
|
(let ((m (process-define-module ',args)))
|
||||||
|
(set-current-module m)
|
||||||
|
m))
|
||||||
(else
|
(else
|
||||||
(error "define-module can only be used at the top level"))))
|
(error "define-module can only be used at the top level"))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue