* Added `note-init-lib' for libraries in scheme/init
* Use it in help.scrbl and in enter.scrbl (which is not reprovided by scheme) * Updated init.scrbl * Improved code in reference.scrbl svn: r11051
This commit is contained in:
parent
c4f62cfc13
commit
a0fd33678f
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
@title[#:tag "enter"]{Interactive Module Loading}
|
@title[#:tag "enter"]{Interactive Module Loading}
|
||||||
|
|
||||||
@note-lib[scheme/enter]
|
@note-init-lib[scheme/enter]
|
||||||
|
|
||||||
@defform*[[(enter! module-path)
|
@defform*[[(enter! module-path)
|
||||||
(enter! #f)]]{
|
(enter! #f)]]{
|
||||||
|
|
|
@ -6,14 +6,7 @@
|
||||||
|
|
||||||
@title{Interactive Help}
|
@title{Interactive Help}
|
||||||
|
|
||||||
@declare-exporting[scheme/help scheme/init]
|
@note-init-lib[scheme/help]
|
||||||
|
|
||||||
@defmodule*/no-declare[(scheme/help)]{The @scheme[help] form documented
|
|
||||||
in this section is provided by the @schememodname[scheme/help] and
|
|
||||||
@schememodname[scheme/init] libraries, which means that it is
|
|
||||||
available when @exec{mzscheme} is started with no command-line
|
|
||||||
arguments. It is not provided by @scheme[scheme] or
|
|
||||||
@scheme[scheme/base].}
|
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defidform[help]
|
@defidform[help]
|
||||||
|
|
|
@ -7,8 +7,9 @@
|
||||||
|
|
||||||
@defmodule*/no-declare[(scheme/init)]{The @schememodname[scheme/init]
|
@defmodule*/no-declare[(scheme/init)]{The @schememodname[scheme/init]
|
||||||
library is the default start-up library for MzScheme. It re-exports
|
library is the default start-up library for MzScheme. It re-exports
|
||||||
the @schememodname[scheme] and @schememodname[scheme/help] libraries,
|
the @schememodname[scheme], @schememodname[scheme/enter] and
|
||||||
and it sets @scheme[current-print] to use @scheme[pretty-print].}
|
@schememodname[scheme/help] libraries, and it sets
|
||||||
|
@scheme[current-print] to use @scheme[pretty-print].}
|
||||||
|
|
||||||
@defmodule*/no-declare[(scheme/gui/init)]{The
|
@defmodule*/no-declare[(scheme/gui/init)]{The
|
||||||
@schememodname[scheme/gui/init] library is the default start-up
|
@schememodname[scheme/gui/init] library is the default start-up
|
||||||
|
|
|
@ -32,11 +32,29 @@
|
||||||
" and "
|
" and "
|
||||||
(schememodname scheme)
|
(schememodname scheme)
|
||||||
" libraries, but not " (schememodname scheme/base)
|
" libraries, but not " (schememodname scheme/base)
|
||||||
"."
|
"."
|
||||||
. more)))]
|
. more)))]
|
||||||
[(_ lib . more)
|
[(_ lib . more)
|
||||||
(note-lib lib #:use-sources () . more)]))
|
(note-lib lib #:use-sources () . more)]))
|
||||||
|
|
||||||
|
(provide note-init-lib)
|
||||||
|
(define-syntax note-init-lib
|
||||||
|
(syntax-rules ()
|
||||||
|
[(_ lib #:use-sources (src ...) . more)
|
||||||
|
(begin
|
||||||
|
(declare-exporting lib scheme/init #:use-sources (src ...))
|
||||||
|
(defmodule*/no-declare (lib)
|
||||||
|
(t "The bindings documented in this section are provided by the "
|
||||||
|
(schememodname lib)
|
||||||
|
" and "
|
||||||
|
(schememodname scheme/init)
|
||||||
|
" libraries, which means that they ara available when "
|
||||||
|
(exec "mzscheme") " is started with no command-line arguments."
|
||||||
|
" They are not provided by " (schememodname scheme/base)
|
||||||
|
" or " (schememodname scheme) "."
|
||||||
|
. more)))]
|
||||||
|
[(_ lib . more)
|
||||||
|
(note-init-lib lib #:use-sources () . more)]))
|
||||||
|
|
||||||
(provide note-lib-only)
|
(provide note-lib-only)
|
||||||
(define-syntax note-lib-only
|
(define-syntax note-lib-only
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "mz.ss"
|
@(require "mz.ss" scribble/struct scheme/list)
|
||||||
scribble/struct)
|
|
||||||
|
|
||||||
@(define (scheme-extra-libs)
|
@(define (scheme-extra-libs)
|
||||||
(make-delayed-element
|
(make-delayed-element
|
||||||
(lambda (renderer p ri)
|
(lambda (renderer p ri)
|
||||||
(let ([keys (resolve-get-keys p ri (lambda (v)
|
(let ([mods (append-map
|
||||||
(eq? (car v) 'scheme-extra-lib)))])
|
(lambda (k) (list ", " (resolve-get p ri k)))
|
||||||
(let ([keys (sort keys string<?
|
(sort (resolve-get-keys
|
||||||
#:key (lambda (k)
|
p ri (lambda (v) (eq? (car v) 'scheme-extra-lib)))
|
||||||
(symbol->string (cadr k)))
|
string<?
|
||||||
#:cache-keys? #t)])
|
#:key (lambda (k) (symbol->string (cadr k)))
|
||||||
(let loop ([keys keys])
|
#:cache-keys? #t))])
|
||||||
(cond
|
`(,@(drop-right mods 2) ", and " ,(last mods))))
|
||||||
[(null? keys) '("")]
|
(lambda () "...")
|
||||||
[(null? (cdr keys)) (list ", and "
|
(lambda () "...")))
|
||||||
(resolve-get p ri (car keys)))]
|
|
||||||
[else (list* ", " (resolve-get p ri (car keys))
|
|
||||||
(loop (cdr keys)))])))))
|
|
||||||
(lambda () "...")
|
|
||||||
(lambda () "...")))
|
|
||||||
|
|
||||||
@title{@bold{Reference}: PLT Scheme}
|
@title{@bold{Reference}: PLT Scheme}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user