diff --git a/CHANGELOG.md b/CHANGELOG.md index 370f7e8c..efd8fc3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. ## Unreleased - ??? +- Add *module/make-env* dynamic binding +- Add buffer/format-at - Add long form command line options for readable CLI usage - Fix bug with `net/accept-loop` that would sometimes miss connections. diff --git a/src/boot/boot.janet b/src/boot/boot.janet index f3dbfd2a..8af8fb27 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2771,6 +2771,7 @@ (defdyn *module/paths* "Dynamic binding for overriding `module/cache`") (defdyn *module/loading* "Dynamic binding for overriding `module/cache`") (defdyn *module/loaders* "Dynamic binding for overriding `module/loaders`") +(defdyn *module/make-env* "Dynamic binding for creating new environments for `import`, `require`, and `dofile`. Overrides `make-env`.") (def module/cache "A table, mapping loaded module identifiers to their environments." @@ -2958,7 +2959,7 @@ :core/stream path (file/open path :rb))) (def path-is-file (= f path)) - (default env (make-env (curenv))) + (default env ((dyn *module/make-env* make-env))) (def spath (string path)) (put env :source (or source (if-not path-is-file spath path))) (var exit-error nil)