add support for firing up a REPL to poke at DrRacket
This commit is contained in:
parent
0ea2b61857
commit
b05767ab13
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
(define first-parallel? (getenv "PLTDRPAR"))
|
(define first-parallel? (getenv "PLTDRPAR"))
|
||||||
|
|
||||||
|
(define repl (getenv "PLTDRREPL"))
|
||||||
|
|
||||||
(define install-cm? (and (not debugging?)
|
(define install-cm? (and (not debugging?)
|
||||||
(getenv "PLTDRCM")))
|
(getenv "PLTDRCM")))
|
||||||
|
|
||||||
|
@ -149,3 +151,14 @@
|
||||||
((dynamic-require 'drracket/private/profile-drs 'start-profile) orig-cust)))
|
((dynamic-require 'drracket/private/profile-drs 'start-profile) orig-cust)))
|
||||||
|
|
||||||
(dynamic-require 'drracket/private/drracket-normal #f)
|
(dynamic-require 'drracket/private/drracket-normal #f)
|
||||||
|
|
||||||
|
(when repl
|
||||||
|
(printf "Welcome to DrRacket, v~a\n" (version))
|
||||||
|
(namespace-require 'racket)
|
||||||
|
(namespace-require 'drracket/tool-lib)
|
||||||
|
(unless (equal? repl "-q")
|
||||||
|
(define init-file (find-system-path 'init-file))
|
||||||
|
(when (file-exists? init-file)
|
||||||
|
(load init-file)))
|
||||||
|
(void (thread read-eval-print-loop)))
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,19 @@ Several environment variables can affect DrRacket's behavior:
|
||||||
variable are @racket[read] and expected to be a single symbol
|
variable are @racket[read] and expected to be a single symbol
|
||||||
or a list of symbols).}
|
or a list of symbols).}
|
||||||
|
|
||||||
|
@item{@indexed-envvar{PLTDRREPL} : When this environment variable is
|
||||||
|
set, DrRacket starts a read-eval-print loop with all of
|
||||||
|
the forms and functions from the @racketmodname[racket]
|
||||||
|
module and those described in @other-doc['(lib "scribblings/tools/tools.scrbl")].
|
||||||
|
|
||||||
|
If it is not set to @litchar{-q}, then @racket[(find-system-path 'init-file)]
|
||||||
|
is loaded as well.
|
||||||
|
|
||||||
|
A new thread is created to evaluate REPL expressions, so be
|
||||||
|
sure to use @racket[queue-callback] to evaluate expressions
|
||||||
|
that mutate the GUI (to avoid race-conditions).
|
||||||
|
}
|
||||||
|
|
||||||
@item{@indexed-envvar{PLTDRCM} : When this environment variable is
|
@item{@indexed-envvar{PLTDRCM} : When this environment variable is
|
||||||
set, DrRacket installs the compilation manager before starting
|
set, DrRacket installs the compilation manager before starting
|
||||||
up, which means that the @filepath{.zo} files are automatically
|
up, which means that the @filepath{.zo} files are automatically
|
||||||
|
|
Loading…
Reference in New Issue
Block a user