* 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}
|
||||
|
||||
@note-lib[scheme/enter]
|
||||
@note-init-lib[scheme/enter]
|
||||
|
||||
@defform*[[(enter! module-path)
|
||||
(enter! #f)]]{
|
||||
|
|
|
@ -6,14 +6,7 @@
|
|||
|
||||
@title{Interactive Help}
|
||||
|
||||
@declare-exporting[scheme/help scheme/init]
|
||||
|
||||
@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].}
|
||||
@note-init-lib[scheme/help]
|
||||
|
||||
@deftogether[(
|
||||
@defidform[help]
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
@defmodule*/no-declare[(scheme/init)]{The @schememodname[scheme/init]
|
||||
library is the default start-up library for MzScheme. It re-exports
|
||||
the @schememodname[scheme] and @schememodname[scheme/help] libraries,
|
||||
and it sets @scheme[current-print] to use @scheme[pretty-print].}
|
||||
the @schememodname[scheme], @schememodname[scheme/enter] and
|
||||
@schememodname[scheme/help] libraries, and it sets
|
||||
@scheme[current-print] to use @scheme[pretty-print].}
|
||||
|
||||
@defmodule*/no-declare[(scheme/gui/init)]{The
|
||||
@schememodname[scheme/gui/init] library is the default start-up
|
||||
|
|
|
@ -37,6 +37,24 @@
|
|||
[(_ lib . 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)
|
||||
(define-syntax note-lib-only
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
#lang scribble/doc
|
||||
@(require "mz.ss"
|
||||
scribble/struct)
|
||||
@(require "mz.ss" scribble/struct scheme/list)
|
||||
|
||||
@(define (scheme-extra-libs)
|
||||
(make-delayed-element
|
||||
(lambda (renderer p ri)
|
||||
(let ([keys (resolve-get-keys p ri (lambda (v)
|
||||
(eq? (car v) 'scheme-extra-lib)))])
|
||||
(let ([keys (sort keys string<?
|
||||
#:key (lambda (k)
|
||||
(symbol->string (cadr k)))
|
||||
#:cache-keys? #t)])
|
||||
(let loop ([keys keys])
|
||||
(cond
|
||||
[(null? keys) '("")]
|
||||
[(null? (cdr keys)) (list ", and "
|
||||
(resolve-get p ri (car keys)))]
|
||||
[else (list* ", " (resolve-get p ri (car keys))
|
||||
(loop (cdr keys)))])))))
|
||||
(let ([mods (append-map
|
||||
(lambda (k) (list ", " (resolve-get p ri k)))
|
||||
(sort (resolve-get-keys
|
||||
p ri (lambda (v) (eq? (car v) 'scheme-extra-lib)))
|
||||
string<?
|
||||
#:key (lambda (k) (symbol->string (cadr k)))
|
||||
#:cache-keys? #t))])
|
||||
`(,@(drop-right mods 2) ", and " ,(last mods))))
|
||||
(lambda () "...")
|
||||
(lambda () "...")))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user