,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*.
This commit is contained in:
parent
d88f5323d1
commit
2aef6c2ba9
2 changed files with 5 additions and 1 deletions
|
|
@ -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)))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue