From ef14dac1797ac5449589a74bfd2e826273791098 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Wed, 5 Oct 2011 20:22:50 +0900 Subject: [PATCH] updating references to *config-env* I missed --- include/chibi/features.h | 2 +- lib/chibi/repl.scm | 36 +++++++++++++++++++----------------- tools/chibi-genstatic | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/include/chibi/features.h b/include/chibi/features.h index bb204c4b..5c12d9f8 100644 --- a/include/chibi/features.h +++ b/include/chibi/features.h @@ -14,7 +14,7 @@ /* #define SEXP_USE_NATIVE_X86 1 */ /* uncomment this to disable the module system */ -/* Currently this just loads the config.scm from main and */ +/* Currently this just loads the meta.scm from main and */ /* sets up an (import (module name)) macro. */ /* #define SEXP_USE_MODULES 0 */ diff --git a/lib/chibi/repl.scm b/lib/chibi/repl.scm index 98447b3b..450242d9 100644 --- a/lib/chibi/repl.scm +++ b/lib/chibi/repl.scm @@ -65,8 +65,8 @@ ;;> ;;> @itemlist[ ;;> @item{@scheme|{@in []}| - switch to @var{}, or the @scheme{interaction-environment} if @var{} is not specified} -;;> @item{@scheme|{@config }| - evaluate @var{} in the @scheme{(config)} module} -;;> @item{@scheme|{@config-module-is }| - switch the config module to @var{}} +;;> @item{@scheme|{@meta }| - evaluate @var{} in the @scheme{(meta)} module} +;;> @item{@scheme|{@meta-module-is }| - switch the meta module to @var{}} ;;> @item{@scheme|{@exit}| - exit the REPL} ;;> ] @@ -79,7 +79,7 @@ (module-env (if (module? module) module - (eval `(load-module ',module) *config-env*))) + (eval `(load-module ',module) *meta-env*))) (interaction-environment))) (history-file (cond ((memq 'history-file: o) => cadr) @@ -95,7 +95,7 @@ (raw? (cond ((memq 'raw?: o) => cadr) (else (member (get-environment-variable "TERM") '("emacs" "dumb")))))) - (let lp ((module module) (env env) (config-env *config-env*)) + (let lp ((module module) (env env) (meta-env *meta-env*)) (let* ((prompt (string-append (if module (write-to-string module) "") "> ")) (line @@ -111,7 +111,7 @@ 'complete?: buffer-complete-sexp?))))) (cond ((or (not line) (eof-object? line))) - ((equal? line "") (lp module env config-env)) + ((equal? line "") (lp module env meta-env)) (else (history-commit! history line) (cond @@ -121,7 +121,7 @@ (continue lp)) (define (fail msg . args) (apply warn msg args) - (continue module env config-env)) + (continue module env meta-env)) (call-with-input-string line (lambda (in) (let ((op (read/ss in))) @@ -130,28 +130,30 @@ (let ((name (read/ss in))) (cond ((eof-object? name) - (continue #f (interaction-environment) config-env)) - ((eval `(load-module ',name) config-env) + (continue #f (interaction-environment) meta-env)) + ((eval `(load-module ',name) meta-env) => (lambda (m) - (continue name (module-env m) config-env))) + (continue name (module-env m) meta-env))) (else (fail "couldn't find module:" name))))) - ((config) + ((meta config) + (if (eq? op 'config) + (display "Note: @config has been renamed @meta\n" out)) (let ((expr (read/ss in))) (cond ((and (symbol? expr) (eqv? escape (string-ref (symbol->string expr) 0))) - (meta config-env + (meta meta-env (substring line 6 (string-length line)) - (lambda _ (continue module env config-env)))) + (lambda _ (continue module env meta-env)))) (else - (eval expr config-env) - (continue module env config-env))))) - ((config-module-is) + (eval expr meta-env) + (continue module env meta-env))))) + ((meta-module-is) (let ((name (read/ss in))) (cond - ((eval `(load-module ',name) config-env) + ((eval `(load-module ',name) meta-env) => (lambda (m) (lp module env (module-env m)))) (else (fail "couldn't find module:" name))))) @@ -180,7 +182,7 @@ (display "Interrupt\n" (current-error-port)) (thread-terminate! thread)) (lambda () (thread-join! (thread-start! thread)))))) - (lp module env config-env))))))) + (lp module env meta-env))))))) (if history-file (call-with-output-file history-file (lambda (out) (write (history->list history) out)))))) diff --git a/tools/chibi-genstatic b/tools/chibi-genstatic index d4ef4a73..cf363b7c 100755 --- a/tools/chibi-genstatic +++ b/tools/chibi-genstatic @@ -91,7 +91,7 @@ (mod-name (map (lambda (x) (or (string->number x) (string->symbol x))) (path-split mod-path)))) (cond - ((eval `(find-module ',mod-name) *config-env*) + ((eval `(find-module ',mod-name) *meta-env*) => (lambda (mod) (cond ((assq 'include-shared (vector-ref mod 2))