mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-06 20:56:38 +02:00
parent
d3cc4de281
commit
c81f3ded3c
1 changed files with 14 additions and 5 deletions
|
@ -140,13 +140,16 @@
|
||||||
;;> @itemlist[
|
;;> @itemlist[
|
||||||
;;> @item{@scheme{in:} - the input port (default @scheme{(current-input-port)})}
|
;;> @item{@scheme{in:} - the input port (default @scheme{(current-input-port)})}
|
||||||
;;> @item{@scheme{out:} - the output port (default @scheme{(current-output-port)})}
|
;;> @item{@scheme{out:} - the output port (default @scheme{(current-output-port)})}
|
||||||
;;> @item{@scheme{module:} - the initial module (default @scheme{(interaction-environment)})}
|
;;> @item{@scheme{module:} - the initial module
|
||||||
|
;;> @item{@scheme{environment:} - the initial environment (default @scheme{(interaction-environment)})}
|
||||||
;;> @item{@scheme{escape:} - the command escape character (default @scheme|{#\@}|)}
|
;;> @item{@scheme{escape:} - the command escape character (default @scheme|{#\@}|)}
|
||||||
;;> @item{@scheme{make-prompt:} - a procedure taking one argument (the current module name as a list) and returning a string to be used as the prompt}
|
;;> @item{@scheme{make-prompt:} - a procedure taking one argument (the current module name as a list) and returning a string to be used as the prompt}
|
||||||
;;> @item{@scheme{history:} - the initial command history}
|
;;> @item{@scheme{history:} - the initial command history}
|
||||||
;;> @item{@scheme{history-file:} - the file to save history to (default ~/.chibi-repl-history)}
|
;;> @item{@scheme{history-file:} - the file to save history to (default ~/.chibi-repl-history)}
|
||||||
;;> ]
|
;;> ]
|
||||||
;;>
|
;;>
|
||||||
|
;;> The module: and environment: keyword arguments should not both be given.
|
||||||
|
;;>
|
||||||
;;> REPL commands in the style of @hyperlink["http://s48.org/"]{Scheme48}
|
;;> REPL commands in the style of @hyperlink["http://s48.org/"]{Scheme48}
|
||||||
;;> are available to control out-of-band properties. By default a command
|
;;> are available to control out-of-band properties. By default a command
|
||||||
;;> is written as an identifier beginning with an "@"@"" character (which
|
;;> is written as an identifier beginning with an "@"@"" character (which
|
||||||
|
@ -174,10 +177,16 @@
|
||||||
(out (cond ((memq 'out: o) => cadr) (else (current-output-port))))
|
(out (cond ((memq 'out: o) => cadr) (else (current-output-port))))
|
||||||
(escape (cond ((memq 'escape: o) => cadr) (else #\@)))
|
(escape (cond ((memq 'escape: o) => cadr) (else #\@)))
|
||||||
(module (cond ((memq 'module: o) => cadr) (else #f)))
|
(module (cond ((memq 'module: o) => cadr) (else #f)))
|
||||||
(env (if module
|
(env (cond
|
||||||
(module-env
|
((memq 'environment: o) =>
|
||||||
(if (module? module) module (load-module module)))
|
(lambda (x)
|
||||||
(interaction-environment)))
|
(if module
|
||||||
|
(error "The module: and environment: keyword arguments should not both be given."))
|
||||||
|
(cadr x)))
|
||||||
|
(module
|
||||||
|
(module-env
|
||||||
|
(if (module? module) module (load-module module))))
|
||||||
|
(else (interaction-environment))))
|
||||||
(make-prompt
|
(make-prompt
|
||||||
(cond
|
(cond
|
||||||
((memq 'make-prompt: o) => cadr)
|
((memq 'make-prompt: o) => cadr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue