summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-16 09:30:03 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-16 09:31:36 +0200
commite8a41aee2932d1332cd4010398c41be56d4c4be3 (patch)
treebc1ee62887f8228b54557f0b1d0ce94bfb1e8954 /module
parent64449a835a0002dbc05d54d5d1389e9052489348 (diff)
downloadguile-e8a41aee2932d1332cd4010398c41be56d4c4be3.tar.gz
'module-define!' honors the 'module' parameter.
* module/ice-9/boot-9.scm (module-define!): In 'module-add!' call, pass MODULE rather than (current-module).
Diffstat (limited to 'module')
-rw-r--r--module/ice-9/boot-9.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 2323b1ec5..a46145ed5 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -1,6 +1,6 @@
;;; -*- mode: scheme; coding: utf-8; -*-
-;;;; Copyright (C) 1995-2014, 2016-2021 Free Software Foundation, Inc.
+;;;; Copyright (C) 1995-2014, 2016-2022 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -361,7 +361,7 @@ If returning early, return the return value of F."
(let ((v (hashq-ref (%get-pre-modules-obarray) sym)))
(if v
(variable-set! v val)
- (module-add! (current-module) sym (make-variable val)))))
+ (module-add! module sym (make-variable val)))))
(define (module-ref module sym)
(let ((v (module-variable module sym)))
(if v (variable-ref v) (error "badness!" (pk module) (pk sym)))))