From 05d87f0612614a9cf0cd2dc5b5452ac46293694c Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 6 Nov 2011 15:59:46 +0900 Subject: [PATCH] @import-only updates the interaction-environment --- lib/chibi/repl.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/chibi/repl.scm b/lib/chibi/repl.scm index 8885bbb6..40b80025 100644 --- a/lib/chibi/repl.scm +++ b/lib/chibi/repl.scm @@ -62,6 +62,8 @@ ;;> the @scheme{escape:} keyword. The following commands are available: ;;> ;;> @itemlist[ +;;> @item{@scheme|{@import }| - import the @var{} in the @scheme{interaction-environment}, useful if the @scheme{import} binding is not available} +;;> @item{@scheme|{@import-only }| - replace the @scheme{interaction-environment} with the given @var{}} ;;> @item{@scheme|{@in []}| - switch to @var{}, or the @scheme{interaction-environment} if @var{} is not specified} ;;> @item{@scheme|{@meta }| - evaluate @var{} in the @scheme{(meta)} module} ;;> @item{@scheme|{@meta-module-is }| - switch the meta module to @var{}} @@ -130,7 +132,9 @@ meta-env))) (if (pair? mod+imps) (let ((env (if (eq? op 'import-only) - (make-environment) + (let ((env (make-environment))) + (interaction-environment env) + env) env)) (imp-env (vector-ref