diff options
author | Andy Wingo <wingo@pobox.com> | 2013-01-21 11:21:19 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-01-22 15:38:04 +0100 |
commit | 5745de917272804ab2b33a3271940b913d0d7c70 (patch) | |
tree | 7fd270a7301ce8c1fb2af7ad242956b7fb5e9a6c /module/system/base | |
parent | a6bd32406d952689494124de56b2d4de7cafac98 (diff) |
current-language is a parameter in boot-9
* module/ice-9/boot-9.scm (current-language): New parameter.
* module/system/base/language.scm (*current-language*): Pull fluid from
parameter.
(current-language): Now a re-exported parameter.
* doc/ref/compiler.texi: Update reference from *current-language* fluid
to current-language parameter.
* module/system/base/compile.scm (compile-and-load):
* module/ice-9/top-repl.scm (top-repl): Default to the current language,
not to Scheme.
* module/ice-9/eval-string.scm:
* module/system/base/language.scm:
* module/system/repl/command.scm:
* module/system/repl/repl.scm: Update to use current-language parameter
and parameterize.
Diffstat (limited to 'module/system/base')
-rw-r--r-- | module/system/base/compile.scm | 2 | ||||
-rw-r--r-- | module/system/base/language.scm | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index 0e44f362c..f92ca7dd1 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -152,7 +152,7 @@ file) comp))) -(define* (compile-and-load file #:key (from 'scheme) (to 'value) +(define* (compile-and-load file #:key (from (current-language)) (to 'value) (env (current-module)) (opts '()) (canonicalization 'relative)) (with-fluids ((%file-port-name-canonicalization canonicalization)) diff --git a/module/system/base/language.scm b/module/system/base/language.scm index 5b27bc98d..81b43b70d 100644 --- a/module/system/base/language.scm +++ b/module/system/base/language.scm @@ -1,6 +1,6 @@ ;;; Multi-language support -;; Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -30,7 +30,9 @@ lookup-compilation-order lookup-decompilation-order invalidate-compilation-cache! default-environment - *current-language* current-language)) + *current-language*) + + #:re-export (current-language)) ;;; @@ -111,7 +113,5 @@ ;;; Current language ;;; -(define *current-language* (make-fluid 'scheme)) - -(define (current-language) - (fluid-ref *current-language*)) +;; Deprecated; use current-language instead. +(define *current-language* (parameter-fluid current-language)) |