mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-05 11:40:20 +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))
|
||||
(set-module-transformer!
|
||||
module
|
||||
(module-ref interface (car (last-pair module-name))
|
||||
(module-ref interface (car (last-pair spec))
|
||||
#f)))
|
||||
(loop (cddr kws)
|
||||
(cons interface reversed-interfaces)
|
||||
|
@ -2598,7 +2598,9 @@
|
|||
(defmacro define-module args
|
||||
`(eval-case
|
||||
((load-toplevel)
|
||||
(set-current-module (process-define-module ',args)))
|
||||
(let ((m (process-define-module ',args)))
|
||||
(set-current-module m)
|
||||
m))
|
||||
(else
|
||||
(error "define-module can only be used at the top level"))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue