1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 14:30:34 +02:00

load modules from within a known environment

* module/ice-9/boot-9.scm (try-module-autoload): Init the module
  excursion with a fresh user module.
This commit is contained in:
Andy Wingo 2010-06-16 09:38:36 +02:00
parent 225dbf6fd4
commit 393929957d

View file

@ -2598,6 +2598,9 @@ module '(ice-9 q) '(make-q q-length))}."
(with-fluids ((current-reader #f))
(save-module-excursion
(lambda ()
;; The initial environment when loading a module is a fresh
;; user module.
(set-current-module (make-fresh-user-module))
(if version
(load (find-versioned-module
dir-hint name version %load-path))