Added documentation for the racket/interactive module
This commit is contained in:
parent
933a494fe0
commit
237418ba0c
|
@ -1,6 +1,6 @@
|
|||
#lang scribble/doc
|
||||
@(require "mz.rkt"
|
||||
(for-label racket/pretty racket/gui/base))
|
||||
(for-label racket/pretty racket/gui/base setup/dirs))
|
||||
|
||||
@title{Init Libraries}
|
||||
|
||||
|
@ -9,10 +9,7 @@
|
|||
library for Racket. It re-exports the
|
||||
@racketmodname[racket], @racketmodname[racket/enter] and
|
||||
@racketmodname[racket/help] libraries, and it sets
|
||||
@racket[current-print] to use @racket[pretty-print].
|
||||
Additionally, if the @racket[xrepl] collection is present,
|
||||
it requires @racket[xrepl].
|
||||
@history[#:changed"6.7" "Use XREPL by default if it is installed."]}
|
||||
@racket[current-print] to use @racket[pretty-print].}
|
||||
|
||||
@defmodule*/no-declare[(racket/gui/init)]{The
|
||||
@racketmodname[racket/gui/init] library is the default start-up
|
||||
|
@ -20,6 +17,39 @@ library for GRacket. It re-exports the @racketmodname[racket/init] and
|
|||
@racketmodname[racket/gui/base] libraries, and it sets
|
||||
@racket[current-load] to use @racket[text-editor-load-handler].}
|
||||
|
||||
@defmodule*/no-declare[(racket/interactive)]{
|
||||
The @racketmodname[racket/interactive] is the default start
|
||||
up library when the REPL begins. It is not run if the
|
||||
@Flag{q}/@DFlag{no-init-file} is specified. The interactive
|
||||
file can be changed by modifying @racket['interactive-file] in the
|
||||
@filepath{config.rktd} file found in
|
||||
@racket[(find-config-dir)]. Alternative, if the file
|
||||
@filepath{interactive.rkt} exists in
|
||||
@racket[(find-system-path 'addon-dir)] it is run rather
|
||||
than the installation wide interactive module.
|
||||
|
||||
The default interactive module starts @racketmodname[xrepl] and
|
||||
runs the @racket[(find-system-path 'init-file)] file in the users home directory. A
|
||||
different interactive file can keep this behavior by
|
||||
requiring @racketmodname[racket/interactive].
|
||||
|
||||
@history[#:added "6.7"]}
|
||||
|
||||
@defmodule*/no-declare[(racket/gui/interactive)]{
|
||||
Similar to @racketmodname[racket/gui/interactive], but for
|
||||
GRacket. This library can be changed by modifying
|
||||
@racket['gui-interactive-file] in the @filepath{config.rktd}
|
||||
file in @racket[(find-config-dir)].
|
||||
|
||||
This library runs the
|
||||
@racket[(find-graphical-system-path 'init-file)] file in
|
||||
the users home directory if it exists, rather than their
|
||||
@racket[(find-system-path 'init-file)]. Unlike
|
||||
@racketmodname[racket/interactive], this library does not
|
||||
start @racketmodname[xrepl].
|
||||
|
||||
@history[#:added "6.7"]}
|
||||
|
||||
@defmodule*/no-declare[(racket/language-info)]{The
|
||||
@racketmodname[racket/language-info] library provides a
|
||||
@racketidfont{get-info} function that takes any value and returns
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#lang scribble/doc
|
||||
@(require "mz.rkt" scribble/bnf (for-label racket/pretty racket/gui/base))
|
||||
@(require "mz.rkt" scribble/bnf (for-label racket/pretty racket/gui/base setup/dirs))
|
||||
|
||||
@(define (FlagFirst n) (as-index (Flag n)))
|
||||
@(define (DFlagFirst n) (as-index (DFlag n)))
|
||||
|
@ -88,10 +88,13 @@ provided that is not a @tech{configuration option}, then the
|
|||
read-eval-print-loop is not started, unless the @Flag{i}/@DFlag{repl}
|
||||
flag is provided on the command line to
|
||||
specifically re-enable it. In addition, just before the command line
|
||||
is started, Racket loads the file @racket[(find-system-path
|
||||
'init-file)] and GRacket loads the file
|
||||
@racket[(find-graphical-system-path 'init-file)] is loaded, unless the
|
||||
@Flag{q}/@DFlag{no-init-file} flag is specified on the command line.
|
||||
is started, Racket runs @racketmodname[racket/interactive]
|
||||
and GRacket runs @racketmodname[racket/gui/interactive], unless a different
|
||||
interactive file is specified in the the installation's @filepath{config.rktd}
|
||||
file found in @racket[(find-config-dir)], or the file @filepath{interactive.rkt}
|
||||
is found in @racket[(find-system-path 'addon-dir)]. If the
|
||||
@Flag{q}/@DFlag{no-init-file} flag is specified on the command line
|
||||
then no interactive file is run.
|
||||
|
||||
Finally, before Racket or GRacket exits, it calls the procedure that
|
||||
is the current value of @racket[executable-yield-handler] in the main
|
||||
|
@ -99,6 +102,8 @@ thread, unless the @Flag{V}/@DFlag{no-yield} command-line flag is
|
|||
specified. Requiring @racketmodname[racket/gui/base] sets this parameter call
|
||||
@racket[(racket 'yield)].
|
||||
|
||||
@history[#:changed "6.7" "Run racket/interactive file rather than directly running .racketrc"]
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
@section[#:tag "exit-status"]{Exit Status}
|
||||
|
|
Loading…
Reference in New Issue
Block a user