diff options
author | Andy Wingo <wingo@pobox.com> | 2011-12-04 21:56:13 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-12-04 21:56:13 +0100 |
commit | 2aef6c2ba990c5829004c28cd410ba26a74c0597 (patch) | |
tree | 471f4f2f0ba7524417a035904329f32847678156 /module | |
parent | d88f5323d10a09533a5b66bb8031a4e2b8e44313 (diff) |
,language at REPL sets current-language
* module/system/repl/command.scm (language): Set the
*current-language*.
* module/system/repl/repl.scm (start-repl): Create a new dynamic scope
for *current-language*.
Diffstat (limited to 'module')
-rw-r--r-- | module/system/repl/command.scm | 1 | ||||
-rw-r--r-- | module/system/repl/repl.scm | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index 3fead7cac..a709c8dd6 100644 --- a/module/system/repl/command.scm +++ b/module/system/repl/command.scm @@ -441,6 +441,7 @@ Change languages." (cur (repl-language repl))) (format #t "Happy hacking with ~a! To switch back, type `,L ~a'.\n" (language-title lang) (language-name cur)) + (fluid-set! *current-language* lang) (set! (repl-language repl) lang))) diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm index 1cffa7187..f7b022999 100644 --- a/module/system/repl/repl.scm +++ b/module/system/repl/repl.scm @@ -132,7 +132,10 @@ ;;; (define* (start-repl #:optional (lang (current-language)) #:key debug) - (run-repl (make-repl lang debug))) + ;; ,language at the REPL will fluid-set! the *current-language*. Make + ;; sure that it does so in a new scope. + (with-fluids ((*current-language* lang)) + (run-repl (make-repl lang debug)))) ;; (put 'abort-on-error 'scheme-indent-function 1) (define-syntax-rule (abort-on-error string exp) |