tweak mzscheme's help form

svn: r8036
This commit is contained in:
Matthew Flatt 2007-12-17 16:23:54 +00:00
parent f5845e01a0
commit 5b984bc34e
3 changed files with 14 additions and 11 deletions

View File

@ -44,7 +44,7 @@
#'(search-for (list str ...)))]
[_
(raise-syntax-error #f
"expects a single identifer; try just `help' for more information"
"expects a single identifer, a #:from clause, or a #:search clause; try just `help' for more information"
stx)])))
(define (open-help-start)
@ -103,9 +103,10 @@
(define (go-to-tag xref t)
(let-values ([(file anchor) (xref-tag->path+anchor xref t)])
(printf "Sending to web browser...\n file: ~a\n anchor: ~a\n"
file
anchor)
(printf "Sending to web browser...\n file: ~a\n"
file)
(when anchor
(printf " anchor: ~a\n" anchor))
(unless (send-url (url->string
(make-url "file"
#f #f #f #t

View File

@ -601,11 +601,13 @@
[(_ spec subs desc ...) #'(defform*/subs [spec] subs desc ...)]))
(define-syntax (defform/none stx)
(syntax-case stx ()
[(_ spec desc ...)
#'(*defforms #f null
[(_ #:literals (lit ...) spec desc ...)
#'(*defforms #f '(lit ...)
'(spec) (list (lambda (ignored) (schemeblock0/form spec)))
null null
(lambda () (list desc ...)))]))
(lambda () (list desc ...)))]
[(_ spec desc ...)
#'(defform/none #:literals () spec desc ...)]))
(define-syntax (defidform stx)
(syntax-case stx ()
[(_ spec-id desc ...)

View File

@ -17,9 +17,9 @@ arguments. It is not provided by @scheme[scheme] or
@deftogether[(
@defidform[help]
@defform/none[(help id)]
@defform/none[(help id #:from module-path)]
@defform/none[(help #:search datum ...)]
@defform/none[#:literals (help) (help id)]
@defform/none[#:literals (help) (help id #:from module-path)]
@defform/none[#:literals (help) (help #:search datum ...)]
)]{
Searches the documentation, and opens a web browser (using the user's
@ -27,7 +27,7 @@ selected browser) to display the results. See
@schememodname[net/sendurl] for information on how the user's browser
is launched.
A simple @scheme[help] form opens this page.
A simple @scheme[help] or @scheme[(help)] form opens this page.
A @scheme[(help id)] form looks for documentation specific to the
current binding of @scheme[id]. For example,