From d11b569abf2a40779a63f1febbdccbab870cb514 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 20 Jul 2015 19:26:33 +0900 Subject: [PATCH] keep (picrin user) empty unless picrin is started in repl mode --- contrib/20.r7rs/scheme/r5rs.scm | 4 +++- contrib/40.srfi/t/1.scm | 3 ++- contrib/60.repl/repl.scm | 3 ++- extlib/benz/state.c | 2 -- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/20.r7rs/scheme/r5rs.scm b/contrib/20.r7rs/scheme/r5rs.scm index e054f3bb..9e2c3b78 100644 --- a/contrib/20.r7rs/scheme/r5rs.scm +++ b/contrib/20.r7rs/scheme/r5rs.scm @@ -8,7 +8,9 @@ (scheme lazy) (scheme eval) (scheme load) - (picrin base)) + (only (picrin base) + library-environment + find-library)) (define-library (scheme null) (import (scheme base)) diff --git a/contrib/40.srfi/t/1.scm b/contrib/40.srfi/t/1.scm index 2cbe5464..a0e85004 100644 --- a/contrib/40.srfi/t/1.scm +++ b/contrib/40.srfi/t/1.scm @@ -23,7 +23,8 @@ ;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ;; IN THE SOFTWARE. -(import (srfi 1) +(import (scheme base) + (srfi 1) (picrin test)) (test-begin) diff --git a/contrib/60.repl/repl.scm b/contrib/60.repl/repl.scm index aa7640cf..2c8bad42 100644 --- a/contrib/60.repl/repl.scm +++ b/contrib/60.repl/repl.scm @@ -21,7 +21,7 @@ (define user-env (library-environment (find-library '(picrin user)))) - (begin + (define (init-env) (current-library (find-library '(picrin user))) (eval '(import (scheme base) @@ -39,6 +39,7 @@ (current-library (find-library '(picrin repl)))) (define (repl) + (init-env) (let loop ((buf "")) (let ((line (readline (if (equal? buf "") "> " "")))) (if (eof-object? line) diff --git a/extlib/benz/state.c b/extlib/benz/state.c index 7fcb51bf..25c89b79 100644 --- a/extlib/benz/state.c +++ b/extlib/benz/state.c @@ -226,8 +226,6 @@ pic_init_core(pic_state *pic) pic_panic(pic, ""); } } - - pic_import(pic, pic->PICRIN_BASE); } pic_state *