racket/collects/scribblings/reference/help.scrbl
Eli Barzilay 4288c6c2c7 The Scribble reader was improved to make it pull out the syntax
punctuations outside of the form, as it does with quote punctuations.
So things like this

  #, @foo{...}

that required the space to make the @foo read as a scribble form are
now better written as

  @#,foo{...}

This changes all such occurrences.  (In case you see this change in
your files and are worried that there might be changes: I mechanically
verified that the result of `read'ing the modified files is identical
to the previous version.)

svn: r15111
2009-06-07 10:12:32 +00:00

100 lines
3.0 KiB
Racket

#lang scribble/doc
@(require "mz.ss"
scribble/struct
(for-label scheme/help
net/url
scheme/gui))
@; Beware of this hard-wired link to the main doc page:
@(define main-doc-page
(link "../index.html"
#:style (make-with-attributes
"plainlink"
`((onclick . ,(format "return GotoPLTRoot(\"~a\");" (version)))))
"main documentation page"))
@title{Interactive Help}
@note-init-lib[scheme/help]
@deftogether[(
@defidform[help]
@defform/none[#:literals (help) (help string ...)]
@defform/none[#:literals (help) (help id)]
@defform/none[#:literals (help) (help id #:from module-path)]
@defform/none[#:literals (help) (help #:search datum ...)]
)]{
@emph{For general help, see the @|main-doc-page|.}
The @scheme[help] form searches the documentation and opens a web
browser (using the user's selected browser) to display the results.
@margin-note{See @schememodname[net/sendurl] for information on how
the user's browser is launched to display help information.}
A simple @scheme[help] or @scheme[(help)] form opens the main
documentation page.
The @scheme[(help string ...)] form---using literal strings, as
opposed to expressions that produce strings---performs a
string-matching search. For example,
@schemeblock[
(help "web browser" "firefox")
]
searches the documentation index for references that include the
phrase ``web browser'' or ``firefox.''
A @scheme[(help id)] form looks for documentation specific to the
current binding of @scheme[id]. For example,
@schemeblock[
(require net/url)
(help url->string)
]
opens a web browser to show the documentation for @scheme[url->string]
from the @schememodname[net/url] library.
For the purposes of @scheme[help], a @scheme[for-label] require
introduces a binding without actually executing the
@schememodname[net/url] library---for cases when you want to check
documentation, but cannot or do not want to run the providing module.
@schemeblock[
(require scheme/gui) (code:comment @#,t{does not work in @exec{mzscheme}})
(require (for-label scheme/gui)) (code:comment @#,t{ok in @exec{mzscheme}})
(help frame%)
]
If @scheme[id] has no for-label and normal binding, then @scheme[help]
lists all libraries that are known to export a binding for
@scheme[id].
The @scheme[(help id #:from module-path)] variant is similar to
@scheme[(help id)], but using only the exports of
@scheme[module-path]. (The @scheme[module-path] module is required
@scheme[for-label] in a temporary namespace.)
@schemeblock[
(help frame% #:from scheme/gui) (code:comment @#,t{equivalent to the above})
]
The @scheme[(help #:search datum ...)] form is similar to
@scheme[(help string ...)], where any non-string form of
@scheme[datum] is converted to a string using @scheme[display]. No
@scheme[datum] is evaluated as an expression.
For example,
@schemeblock[
(help #:search "web browser" firefox)
]
also searches the documentation index for references that include the
phrase ``web browser'' or ``firefox.''
}