change Scribble to complain about colliding tags

svn: r8025
This commit is contained in:
Matthew Flatt 2007-12-16 03:10:00 +00:00
parent 8f463ff1c4
commit fd1de94a48
30 changed files with 287 additions and 269 deletions

View File

@ -39,13 +39,13 @@ that the sendmail process can complete.
The @scheme[from] argument can be any value; of course, spoofing
should be used with care.}
@defproc[(send-mail-message/port [from string?]
[subject string?]
[to (listof string?)]
[cc (listof string?)]
[bcc (listof string?)]
[body (listof string?)]
[extra-header string?] ...)
@defproc[(send-mail-message [from string?]
[subject string?]
[to (listof string?)]
[cc (listof string?)]
[bcc (listof string?)]
[body (listof string?)]
[extra-header string?] ...)
void?]{
Like @scheme[send-mail-message/port], but with @scheme[body] as a list

View File

@ -10,7 +10,7 @@
"norm-define.ss"
"qqstx.ss"))
(#%provide new-lambda
(#%provide new-lambda new-λ
new-define
new-app
(rename *make-keyword-procedure make-keyword-procedure)
@ -280,165 +280,168 @@
#f "bad argument sequence" stx (syntax args))]))))
;; The new `lambda' form:
(define-syntax (new-lambda stx)
(syntax-case stx ()
[(_ args body1 body ...)
(if (simple-args? #'args)
;; Use plain old `lambda':
(syntax/loc stx
(lambda args body1 body ...))
;; Handle keyword or optional arguments:
(with-syntax ([((plain-id ...)
(opt-id ...)
([id opt-expr kind] ...)
([kw kw-id kw-req] ...)
need-kw
rest)
(parse-formals stx #'args)])
(let ([dup-id (check-duplicate-identifier (syntax->list #'(id ... . rest)))])
(when dup-id
(raise-syntax-error
#f
"duplicate argument identifier"
stx
dup-id)))
(let* ([kws (syntax->list #'(kw ...))]
[opts (syntax->list #'(opt-id ...))]
[ids (syntax->list #'(id ...))]
[plain-ids (syntax->list #'(plain-id ...))]
[kw-reqs (syntax->list #'(kw-req ...))]
[kw-args (generate-temporaries kws)] ; to hold supplied value
[kw-arg?s (generate-temporaries kws)] ; to indicated whether it was supplied
[opt-args (generate-temporaries opts)] ; supplied value
[opt-arg?s (generate-temporaries opts)] ; whether supplied
[needed-kws (sort (syntax->list #'need-kw)
(lambda (a b) (keyword<? (syntax-e a) (syntax-e b))))]
[sorted-kws (sort (map list kws kw-args kw-arg?s kw-reqs)
(lambda (a b) (keyword<? (syntax-e (car a))
(syntax-e (car b)))))])
(with-syntax ([(kw-arg ...) kw-args]
[(kw-arg? ...) (let loop ([kw-arg?s kw-arg?s]
[kw-reqs kw-reqs])
(cond
[(null? kw-arg?s) null]
[(not (syntax-e (car kw-reqs)))
(cons (car kw-arg?s) (loop (cdr kw-arg?s) (cdr kw-reqs)))]
[else (loop (cdr kw-arg?s) (cdr kw-reqs))]))]
[kws-sorted sorted-kws]
[(opt-arg ...) opt-args]
[(opt-arg? ...) opt-arg?s]
[(new-plain-id ...) (generate-temporaries #'(plain-id ...))]
[new-rest (if (null? (syntax-e #'rest))
'()
'(new-rest))]
[(rest-id) (if (null? (syntax-e #'rest))
'(())
#'rest)]
[rest-empty (if (null? (syntax-e #'rest))
'()
'(null))])
(let ([with-core
(lambda (result)
;; body of procedure, where all keyword and optional
;; argments come in as a pair of arguments (value and
;; whether the value is valid):
(syntax-property
(quasisyntax/loc stx
;; We need to push the certificates way down, so that
;; the `class' macro (for example) can pull it apart
;; enough to insert an additional argument.
(let #,(syntax-property
#`(#,(syntax-property
#`[core
#,(syntax-property
#`(lambda #,(syntax-property
#`(given-kws given-args
new-plain-id ...
opt-arg ...
opt-arg? ...
. new-rest)
'certify-mode
'transparent)
;; sort out the arguments into the user-supplied bindings,
;; evaluating default-values expressions as needed:
(let-kws given-kws given-args kws-sorted
(let-maybe ([id opt-expr kind] ... . rest)
(kw-arg ...) (kw-arg? ...)
(opt-arg ...) (opt-arg? ...)
(new-plain-id ... . new-rest)
;; the original body, finally:
body1 body ...)))
'certify-mode
'transparent)]
'certify-mode
'transparent))
'certify-mode
'transparent)
;; entry points use `core':
#,result))
'certify-mode
'transparent))]
[mk-no-kws
(lambda ()
;; entry point without keywords:
(syntax/loc stx
(opt-cases (core null null) ([opt-id opt-arg opt-arg?] ...) (plain-id ...)
() (rest-empty rest-id . rest)
())))]
[mk-with-kws
(lambda ()
;; entry point with keywords:
(if (and (null? opts)
(null? #'new-rest))
#'core
(syntax/loc stx
(opt-cases (core) ([opt-id opt-arg opt-arg?] ...) (given-kws given-args plain-id ...)
() (rest-empty rest-id . rest)
()))))]
[mk-kw-arity-stub
(lambda ()
;; struct-type entry point for no keywords when a keyword is required
(syntax/loc stx
(fail-opt-cases (missing-kw) (opt-id ...) (self plain-id ...)
() (rest-id . rest)
())))])
(cond
[(null? kws)
;; just the no-kw part
(with-core (mk-no-kws))]
[(null? needed-kws)
;; both parts dispatch to core
(with-core
(with-syntax ([kws (map car sorted-kws)]
[no-kws (let ([p (mk-no-kws)]
[n (syntax-local-infer-name stx)])
(if n
#`(let ([#,n #,p]) #,n)
p))]
[with-kws (mk-with-kws)])
(syntax/loc stx
(make-optional-keyword-procedure
with-kws
null
'kws
no-kws))))]
[else
;; just the keywords part dispatches to core,
;; and the other part dispatches to failure
(with-core
(with-syntax ([kws (map car sorted-kws)]
[needed-kws needed-kws]
[no-kws (mk-no-kws)]
[with-kws (mk-with-kws)]
[mk-id (with-syntax ([n (syntax-local-infer-name stx)]
[call-fail (mk-kw-arity-stub)])
(syntax-local-lift-expression
#'(make-required 'n call-fail)))])
(syntax/loc stx
(mk-id
with-kws
'needed-kws
'kws))))]))))))]))
(define-syntaxes (new-lambda new-λ)
(let ([new-lambda
(lambda (stx)
(syntax-case stx ()
[(_ args body1 body ...)
(if (simple-args? #'args)
;; Use plain old `lambda':
(syntax/loc stx
(lambda args body1 body ...))
;; Handle keyword or optional arguments:
(with-syntax ([((plain-id ...)
(opt-id ...)
([id opt-expr kind] ...)
([kw kw-id kw-req] ...)
need-kw
rest)
(parse-formals stx #'args)])
(let ([dup-id (check-duplicate-identifier (syntax->list #'(id ... . rest)))])
(when dup-id
(raise-syntax-error
#f
"duplicate argument identifier"
stx
dup-id)))
(let* ([kws (syntax->list #'(kw ...))]
[opts (syntax->list #'(opt-id ...))]
[ids (syntax->list #'(id ...))]
[plain-ids (syntax->list #'(plain-id ...))]
[kw-reqs (syntax->list #'(kw-req ...))]
[kw-args (generate-temporaries kws)] ; to hold supplied value
[kw-arg?s (generate-temporaries kws)] ; to indicated whether it was supplied
[opt-args (generate-temporaries opts)] ; supplied value
[opt-arg?s (generate-temporaries opts)] ; whether supplied
[needed-kws (sort (syntax->list #'need-kw)
(lambda (a b) (keyword<? (syntax-e a) (syntax-e b))))]
[sorted-kws (sort (map list kws kw-args kw-arg?s kw-reqs)
(lambda (a b) (keyword<? (syntax-e (car a))
(syntax-e (car b)))))])
(with-syntax ([(kw-arg ...) kw-args]
[(kw-arg? ...) (let loop ([kw-arg?s kw-arg?s]
[kw-reqs kw-reqs])
(cond
[(null? kw-arg?s) null]
[(not (syntax-e (car kw-reqs)))
(cons (car kw-arg?s) (loop (cdr kw-arg?s) (cdr kw-reqs)))]
[else (loop (cdr kw-arg?s) (cdr kw-reqs))]))]
[kws-sorted sorted-kws]
[(opt-arg ...) opt-args]
[(opt-arg? ...) opt-arg?s]
[(new-plain-id ...) (generate-temporaries #'(plain-id ...))]
[new-rest (if (null? (syntax-e #'rest))
'()
'(new-rest))]
[(rest-id) (if (null? (syntax-e #'rest))
'(())
#'rest)]
[rest-empty (if (null? (syntax-e #'rest))
'()
'(null))])
(let ([with-core
(lambda (result)
;; body of procedure, where all keyword and optional
;; argments come in as a pair of arguments (value and
;; whether the value is valid):
(syntax-property
(quasisyntax/loc stx
;; We need to push the certificates way down, so that
;; the `class' macro (for example) can pull it apart
;; enough to insert an additional argument.
(let #,(syntax-property
#`(#,(syntax-property
#`[core
#,(syntax-property
#`(lambda #,(syntax-property
#`(given-kws given-args
new-plain-id ...
opt-arg ...
opt-arg? ...
. new-rest)
'certify-mode
'transparent)
;; sort out the arguments into the user-supplied bindings,
;; evaluating default-values expressions as needed:
(let-kws given-kws given-args kws-sorted
(let-maybe ([id opt-expr kind] ... . rest)
(kw-arg ...) (kw-arg? ...)
(opt-arg ...) (opt-arg? ...)
(new-plain-id ... . new-rest)
;; the original body, finally:
body1 body ...)))
'certify-mode
'transparent)]
'certify-mode
'transparent))
'certify-mode
'transparent)
;; entry points use `core':
#,result))
'certify-mode
'transparent))]
[mk-no-kws
(lambda ()
;; entry point without keywords:
(syntax/loc stx
(opt-cases (core null null) ([opt-id opt-arg opt-arg?] ...) (plain-id ...)
() (rest-empty rest-id . rest)
())))]
[mk-with-kws
(lambda ()
;; entry point with keywords:
(if (and (null? opts)
(null? #'new-rest))
#'core
(syntax/loc stx
(opt-cases (core) ([opt-id opt-arg opt-arg?] ...) (given-kws given-args plain-id ...)
() (rest-empty rest-id . rest)
()))))]
[mk-kw-arity-stub
(lambda ()
;; struct-type entry point for no keywords when a keyword is required
(syntax/loc stx
(fail-opt-cases (missing-kw) (opt-id ...) (self plain-id ...)
() (rest-id . rest)
())))])
(cond
[(null? kws)
;; just the no-kw part
(with-core (mk-no-kws))]
[(null? needed-kws)
;; both parts dispatch to core
(with-core
(with-syntax ([kws (map car sorted-kws)]
[no-kws (let ([p (mk-no-kws)]
[n (syntax-local-infer-name stx)])
(if n
#`(let ([#,n #,p]) #,n)
p))]
[with-kws (mk-with-kws)])
(syntax/loc stx
(make-optional-keyword-procedure
with-kws
null
'kws
no-kws))))]
[else
;; just the keywords part dispatches to core,
;; and the other part dispatches to failure
(with-core
(with-syntax ([kws (map car sorted-kws)]
[needed-kws needed-kws]
[no-kws (mk-no-kws)]
[with-kws (mk-with-kws)]
[mk-id (with-syntax ([n (syntax-local-infer-name stx)]
[call-fail (mk-kw-arity-stub)])
(syntax-local-lift-expression
#'(make-required 'n call-fail)))])
(syntax/loc stx
(mk-id
with-kws
'needed-kws
'kws))))]))))))]))])
(values new-lambda new-lambda)))
(define (missing-kw proc . args)
(apply

View File

@ -30,7 +30,7 @@
(all-from "define.ss")
(all-from-except "letstx-scheme.ss" -define -define-syntax -define-struct)
(rename new-lambda lambda)
(rename new-lambda λ)
(rename new-λ λ)
(rename new-define define)
(rename new-app #%app)
(rename #%app #%plain-app)

View File

@ -119,11 +119,11 @@
(hash-table-for-each (collect-info-ht p-ci)
(lambda (k v)
(when (cadr k)
(hash-table-put! (collect-info-ht ci)
(if prefix
(convert-key prefix k)
k)
v)))))))
(collect-put! ci
(if prefix
(convert-key prefix k)
k)
v)))))))
(define/private (convert-key prefix k)
(case (car k)

View File

@ -780,7 +780,7 @@
(table? (car (splice-run box)))
(eq? 'boxed (table-style (car (splice-run box)))))
(error 'deftogether "element is not a boxing splice containing a single table: ~e" box))
(list (make-flow (list (make-table #f (table-flowss (car (splice-run box))))))))
(list (make-flow (list (make-table "together" (table-flowss (car (splice-run box))))))))
boxes))
(parameterize ([current-variable-list
(apply append (map box-splice-var-list boxes))])

View File

@ -253,6 +253,10 @@
background-color: #E8E8FF;
}
.together {
width: 100%;
}
.prototype td {
vertical-align: top;
}

View File

@ -15,9 +15,12 @@
(define (collect-put! ci key val)
(hash-table-put! (collect-info-ht ci)
key
val))
(let ([ht (collect-info-ht ci)])
(when (hash-table-get ht key #f)
(fprintf (current-error-port)
"WARNING: collected information for key multiple times: ~e\n"
key))
(hash-table-put! ht key val)))
(define (resolve-get/where part ri key)
(let ([key (tag-key key ri)])

View File

@ -82,11 +82,11 @@ Now, the standard cut and paste operations work, and the user can even
on the outside of the box is rearranged as the box changes
sizes. Note that the box itself can be copied and pasted.
The content of an editor is made up of @deftech{snips}. An embedded
editor is a single snip from the embedding editor's point-of-view. To
encode immediate text, a snip can be a single character, but more
often a snip is a sequence of adjacent characters on the same
line. The @method[text% find-snip] method extracts a snip
The content of an editor is made up of @defterm{@tech{snips}}. An
embedded editor is a single snip from the embedding editor's
point-of-view. To encode immediate text, a snip can be a single
character, but more often a snip is a sequence of adjacent characters
on the same line. The @method[text% find-snip] method extracts a snip
from a text editor:
@schemeblock[
@ -396,15 +396,15 @@ Graceful and extensible encoding of snips requires that
@item{Some editors may require additional information to be stored
about a snip; this information is orthogonal to the type-specific
information stored by the snip itself. For example, a pasteboard
needs to remember a snip's @techlink{location}, while a text editor does not
need this information. If data is being cut and pasted from one
pasteboard to another, then information about relative @techlink{location}s
needs to be maintained, but this information should not inhibit
pasting into an editor. Extra data is associated with a snip through
@deftech{editor data} objects, instances of the
@scheme[editor-data%] class; decoding requires that each editor data
object has an @deftech{editor data class}, an instance of the
@scheme[editor-data-class%] class.}
needs to remember a snip's @techlink{location}, while a text editor
does not need this information. If data is being cut and pasted from
one pasteboard to another, then information about relative
@techlink{location}s needs to be maintained, but this information
should not inhibit pasting into an editor. Extra data is associated
with a snip through @deftech{editor data} objects, which are
instances of the @scheme[editor-data%] class; decoding requires that
each editor data object has an @deftech{editor data class}, which is
an instance of the @scheme[editor-data-class%] class.}
}
@ -415,7 +415,7 @@ Snip classes, snip data, and snip data classes solve problems related
@subsubsection[#:tag "editorsnipclasses"]{Snip Classes}
Each snip can be associated to a @deftech{snip class}. This ``class''
Each snip can be associated to a @tech{snip class}. This ``class''
is not a class description in the programmer's language; it is an
object which provides a way to create new snips of the appropriate
type from an encoded snip specification.
@ -455,12 +455,12 @@ A snip class's name can also be just @scheme["(lib ...)"], which is
While a snip belongs to an editor, the editor may store extra
information about a snip in some specialized way. When the snip is to
be encoded, this extra information needs to be put into an
@deftech{editor data} object so that the extra information can be
@tech{editor data} object so that the extra information can be
encoded as well. In a text editor, extra information can be
associated with ranges of @techlink{item}s, as well as snips.
Just as a snip must be associated with a snip class to be decoded (see
@|snipclassdiscuss|), an editor data object needs an @deftech{editor
@|snipclassdiscuss|), an editor data object needs an @tech{editor
data class} for decoding. Every editor data class object can be added
to the eventspace-specific @deftech{editor data class list}, returned
by @scheme[get-the-editor-data-class-list]. Alternatively, like snip

View File

@ -8,17 +8,17 @@ For documentation purposes, the MrEd toolbox is organized into three
@itemize{
@item{The @deftech{windowing} toolbox, for implementing form-filling
@item{The @deftech{windowing toolbox}, for implementing form-filling
GUI programs (such as a database query window) using buttons, menus,
text fields, and events. The windowing toolbox is described in
@secref["windowing-overview"].}
@item{The @deftech{drawing} toolbox, for drawing pictures or
@item{The @deftech{drawing toolbox}, for drawing pictures or
implementing dynamic GUI programs (such as a video game) using
drawing canvases, pens, and brushes. The drawing toolbox is
described in @secref["drawing-overview"].}
@item{The @deftech{editor} toolbox, for developing traditional text
@item{The @deftech{editor toolbox}, for developing traditional text
editors, editors that mix text and graphics, or free-form layout
editors (such as a word processor, HTML editor, or icon-based file
browser). The editor toolbox is described in

View File

@ -109,7 +109,7 @@ In addition to dispatching events, the GUI classes also handle the
graphical layout of windows. Our example frame demonstrates a simple
layout; the frame's elements are lined up top-to-bottom. In general,
a programmer specifies the layout of a window by assigning each GUI
element to a parent @deftech{container}. A vertical container, such
element to a parent @tech{container}. A vertical container, such
as a frame, arranges its children in a column, and a horizontal
container arranges its children in a row. A container can be a child
of another container; for example, to place two buttons side-by-side
@ -296,9 +296,9 @@ Menu bars, menus, and menu items are graphical elements, but not areas
@item{@scheme[separator-menu-item%] --- a @deftech{separator} is
an unselectable line in a menu or popup menu.}
@item{@scheme[menu-item%] --- a @deftech{menu item} is a selectable
text item in a menu. When the item is selected, its callback procedure
is invoked.}
@item{@scheme[menu-item%] --- a @deftech{plain menu item} is a
selectable text item in a menu. When the item is selected, its
callback procedure is invoked.}
@item{@scheme[checkable-menu-item%] --- a @deftech{checkable menu
item} is a text item in a menu; the user selects a checkable menu
@ -405,7 +405,7 @@ Each @tech{containee}, or child, has the following properties:
@item{horizontal and vertical @deftech{stretchability} (on or off); and}
@item{horizontal and vertical @deftech{margins}.}
@item{horizontal and vertical @tech{margins}.}
}
@ -822,7 +822,7 @@ Although a programmer has no direct control over the order in which
@subsection[#:tag "espacethreads"]{Eventspaces and Threads}
When a new eventspace is created, a corresponding @deftech{handler
When a new eventspace is created, a corresponding @tech{handler
thread} is created for the eventspace. When the system dispatches an
event for an eventspace, it always does so in the eventspace's
handler thread. A handler procedure can create new threads that run

View File

@ -435,7 +435,7 @@ special comment contains the comment text.}
A text-mode reader for XML boxes.}]
@defclass[comment-editor% editor% (readable<%>)]{
@defclass[xml-editor% editor% (readable<%>)]{
Instantiated for DrScheme XML boxes in a @tech{WXME} stream for text
mode.
@ -469,7 +469,7 @@ Scheme boxes.}
A text-mode reader for Scheme boxes.}]
@defclass[comment-editor% editor% (readable<%>)]{
@defclass[scheme-editor% editor% (readable<%>)]{
Instantiated for DrScheme Scheme boxes in a @tech{WXME} stream for text
mode.
@ -493,15 +493,15 @@ Generates an S-expression for the code in the box.}
@section{DrScheme Text Boxes}
@defmodule[wxme/scheme]
@defmodule[wxme/text]
@in[wxme/scheme
@in[wxme/text
@defthing[reader (is-a?/c snip-reader<%>)]{
A text-mode reader for text boxes.}]
@defclass[comment-editor% editor% (readable<%>)]{
@defclass[text-editor% editor% (readable<%>)]{
Instantiated for DrScheme text boxes in a @tech{WXME} stream for text
mode.

View File

@ -92,7 +92,7 @@ printed output.
@; ----------------------------------------------------------------------
@section[#:tag "macros"]{Reader Extension}
@section[#:tag "reader"]{Reader Extension}
@; ----------------------------------------------------------------------
@section[#:tag "security"]{Security}

View File

@ -93,8 +93,8 @@ initial module mapping, further modules can be loaded.
A namespace created with @scheme[make-base-empty-namespace] is
suitable for many basic dynamic tasks. For example, suppose that a
@schememodname[my-dsl] library implements a domain-specific language in
which you want to execute commands from a user-specified file. A
@schememodfont{my-dsl} library implements a domain-specific language
in which you want to execute commands from a user-specified file. A
namespace created with @scheme[make-base-empty-namespace] is enough to
get started:

View File

@ -815,7 +815,7 @@ is made if @var{copy} is not 0. The string @var{bytes} should contain
nul terminator in addition. If @var{len} is negative, then the
nul-terminated length of @var{bytes} is used for the length.}
@function[(Scheme_Object* scheme_make_sized_path
@function[(Scheme_Object* scheme_make_sized_offset_path
[char* bytes]
[long d]
[long len]

View File

@ -517,12 +517,13 @@ interfaces. The API for Scheme's GUI and graphics system is expressed
in terms of objects and classes.
The class system itself is implemented by the
@schememodname[scheme/class] library, and the @schememodname[mred]
library provides the GUI and drawing classes. By convention, the MrEd
classes are given names that end with @scheme[%]:
@schememodname[scheme/class] library, and the
@schememodname[scheme/gui/base] library provides the GUI and drawing
classes. By convention, the classes are given names that end with
@scheme[%]:
@mr-defs+int[
[(require scheme/class mred)
[(require scheme/class scheme/gui/base)
(define f (new frame% [label "My Art"]
[width 300]
[height 300]
@ -539,8 +540,8 @@ such as @scheme[show], with arguments after the method name; the
argument @scheme[#t] in this case is the boolean constant ``true.''
Pictures generated with @schememodname[slideshow] encapsulate a
function that uses MrEd's drawing commands to render the picture to a
drawing context, such as a canvas in a frame. The
function that uses the graphics toolbox's drawing commands to render
the picture to a drawing context, such as a canvas in a frame. The
@scheme[make-pict-drawer] function from @schememodname[slideshow]
exposes a picture's drawing function. We can use
@scheme[make-pict-drawer] in a canvas-painting callback to draw a

View File

@ -90,10 +90,11 @@ A @deftech{class} specifies
}
An @deftech{object} is a collection of bindings for fields that are
instantiated according to a class description.
In the context of the class system, an @defterm{object} is a
collection of bindings for fields that are instantiated according to a
class description.
The object system allows a program to define a new class (a
The class system allows a program to define a new class (a
@deftech{derived class}) in terms of an existing class (the
@deftech{superclass}) using inheritance, overriding, and augmenting:

View File

@ -16,7 +16,7 @@ work sensibly together. Many are redundant; for example,
@deftogether[(
@defform[(% expr)]
@defform[(% expr handler-expr)]
@defform/none[(% expr handler-expr)]
@defproc[(fcontrol [v any/c]) any]
)]{

View File

@ -76,7 +76,7 @@ UTF-8 for encoding.
@defparam[current-locale locale (or/c string? false/c)]{
A parameter that determines the current @deftech{locale} for
A parameter that determines the current @tech{locale} for
procedures such as @scheme[string-locale-ci=?].
When locale sensitivity is disabled by setting the parameter to

View File

@ -17,9 +17,9 @@ arguments. It is not provided by @scheme[scheme] or
@deftogether[(
@defidform[help]
@defform[(help id)]
@defform[(help id #:from module-path)]
@defform[(help #:search datum ...)]
@defform/none[(help id)]
@defform/none[(help id #:from module-path)]
@defform/none[(help #:search datum ...)]
)]{
Searches the documentation, and opens a web browser (using the user's

View File

@ -9,13 +9,14 @@
A @deftech{weak box} is similar to a normal box (see
@secref["boxes"]), but when the garbage collector (see
@secref["gc-model"]) can prove that the content value of a weak box
is only reachable via weak references, the content of the weak box is
replaced with @scheme[#f]. A @deftech{weak reference} is a reference
through a weak box, through a key reference in a weak hash table (see
@secref["hashtables"]), through a value in an ephemeron where the
value can be replaced by @scheme[#f] (see @secref["ephemerons"]), or
through a custodian (see @secref["custodians"]).
@secref["gc-model"]) can prove that the content value of a weak box is
only reachable via weak references, the content of the weak box is
replaced with @scheme[#f]. A @defterm{@tech{weak reference}} is a
reference through a weak box, through a key reference in a weak hash
table (see @secref["hashtables"]), through a value in an ephemeron
where the value can be replaced by @scheme[#f] (see
@secref["ephemerons"]), or through a custodian (see
@secref["custodians"]).
@defproc[(make-weak-box [v any/c]) weak-box?]{

View File

@ -2,7 +2,7 @@
@require["mz.ss"
(for-label scheme/port)]
@title[#:tag "customport"]{More Port Constructors and Events}
@title{More Port Constructors and Events}
@note-lib[scheme/port]

View File

@ -10,8 +10,8 @@ module name (see @secref["modpathidx"]), an @tech{inspector} (see
is attached as either an @deftech{active certificate} or an
@deftech{inactive certificate}.
The @scheme[datum->syntax] procedure never transfers an
@deftech{active certificate} from one syntax object to another. The
The @scheme[datum->syntax] procedure never transfers an @tech{active
certificate} from one syntax object to another. The
@scheme[syntax-recertify] procedure can be used to transfer a
certificate from one syntax object to another, but only if the
certificate's key is provided, or if a sufficiently powerful inspector

View File

@ -1,7 +1,7 @@
#lang scribble/doc
@require["mz.ss"]
@title[#:tag "expansion"]{Expanding Top-Level Forms}
@title{Expanding Top-Level Forms}
@defproc[(expand [top-level-form any/c]) syntax?]{

View File

@ -98,19 +98,18 @@ information on properties and byte codes.
@;------------------------------------------------------------------------
@defproc[(syntax-property [stx syntax?][key any/c][v any/c])
syntax?]{
@defproc*[([(syntax-property [stx syntax?][key any/c][v any/c])
syntax?]
[(syntax-property [stx syntax?][key any/c]) any])]{
Extends @scheme[stx] by associating an arbitrary property value
@scheme[v] with the key @scheme[key]; the result is a new syntax
object with the association (while @scheme[stx] itself is unchanged).}
The three-argument form extends @scheme[stx] by associating an
arbitrary property value @scheme[v] with the key @scheme[key]; the
result is a new syntax object with the association (while @scheme[stx]
itself is unchanged).
@defproc[(syntax-property [stx syntax?][key any/c]) any]{
Returns an arbitrary property value associated to @scheme[stx] with
the key @scheme[key], or @scheme[#f] if no value is associated to
@scheme[stx] for @scheme[key].}
The two-argument form returns an arbitrary property value associated
to @scheme[stx] with the key @scheme[key], or @scheme[#f] if no value
is associated to @scheme[stx] for @scheme[key].}
@defproc[(syntax-property-symbol-keys [stx syntax?]) list?]{

View File

@ -458,7 +458,7 @@ time, rather than run time (though the two times can overlap), though
the binding itself is introduced with @tech{phase level} 0 (i.e., in
the @tech{base environment}).
The @deftech{value} for the binding is obtained by evaluating the
The @tech{value} for the binding is obtained by evaluating the
expression in the @scheme[define-syntaxes] form. This expression must
be @tech{expand}ed (i.e. parsed) before it can be evaluated, and it is
expanded at @tech{phase level} 1 (i.e., in the @tech{transformer

View File

@ -331,7 +331,7 @@ the procedure body.
(let ([f (lambda (x #:arg y) (list y x))])
(list (f 1 #:arg 2)
(f #:arg 2 1)))
]}
]
When compiling a @scheme[lambda] or @scheme[case-lambda] expression,
Scheme looks for a @indexed-scheme['method-arity-error] property
@ -343,7 +343,7 @@ will hide the first argument, if one was provided. (Hiding the first
argument is useful when the procedure implements a method, where the
first argument is implicit in the original source). The property
affects only the format of @scheme[exn:fail:contract:arity]
exceptions, not the result of @scheme[procedure-arity].
exceptions, not the result of @scheme[procedure-arity].}
@defform/subs[(case-lambda [formals body ...+] ...)

View File

@ -3,8 +3,8 @@
@title[#:tag "threadcells"]{Thread Cells}
A @deftech{thread cell} contains a thread-specific value; that is, it
contains a specific value for each thread, but it may contain
A @defterm{@tech{thread cell}} contains a thread-specific value; that
is, it contains a specific value for each thread, but it may contain
different values for different threads. A thread cell is created with
a default value that is used for all existing threads. When the cell's
content is changed with @scheme[thread-cell-set!], the cell's value
@ -12,12 +12,12 @@ changes only for the current thread. Similarly,
@scheme[thread-cell-ref] obtains the value of the cell that is
specific to the current thread.
A thread cell's value can be @deftech{preserved}, which means that
when a new thread is created, the cell's initial value for the new
thread is the same as the creating thread's current value. If a thread
cell is non-preserved, then the cell's initial value for a newly
created thread is the default value (which was supplied when the cell
was created).
A thread cell's value can be @defterm{@tech{preserved}}, which means
that when a new thread is created, the cell's initial value for the
new thread is the same as the creating thread's current value. If a
thread cell is non-preserved, then the cell's initial value for a
newly created thread is the default value (which was supplied when the
cell was created).
Within the current thread, the current values of all preserved threads
cells can be captured through

View File

@ -49,7 +49,7 @@ EOS
@item{Run @exec{setup-plt} to build your documentation. For a
collection, optionally supply @Flag{l} followed by the
collection name to limit the build process to the collection.}
collection name to limit the build process to that collection.}
@item{The generated documentation is
@filepath{compiled/doc/manual/index.html} within the
@ -57,9 +57,9 @@ EOS
If you want the output to be relative to the PLT Scheme
documentation directory (which is recommend only for those who
produce the ``official'' PLT Scheme distribution), add the
@scheme['main-doc] option to the @scheme[scribblings]
definition in @filepath{info.ss}.}
produce the ``official'' PLT Scheme distribution, and even
then only in certain cases), add the @scheme['main-doc] option
to the @scheme[scribblings] definition in @filepath{info.ss}.}
}
@ -92,14 +92,14 @@ one must be present. No spaces are allowed between
A @nonterm{cmd} or @nonterm{datum} is a Scheme datum, while a
@nonterm{text-body} is itself in text mode.
The expansion of a @litchar["@"] form into Scheme code is
The expansion of @litchar["@"]@nonterm{cmd} into Scheme code is
@schemeblock[
@nonterm{cmd}
#, @nonterm{cmd}
]
if neither @litchar["["] @litchar["]"] nor @litchar["{"] @litchar["}"]
are used, otherwise
When either @litchar["["] @litchar["]"] or @litchar["{"] @litchar["}"]
are used, the expansion is
@schemeblock[
(#, @nonterm{cmd} #, @kleenestar{@nonterm{datum}} #, @kleenestar{@nonterm{parsed-body}})

View File

@ -662,7 +662,7 @@ output, a hyperlink underline appears even when the mouse is not over
the link.}
@; ------------------------------------------------------------------------
@section{Indexing}
@section[#:tag "manual-indexing"]{Indexing}
@defform[(indexed-scheme datum ...)]{
@ -801,7 +801,7 @@ correspond to the documented name of the binding and the primary
modules that export the documented name (but this list is not
exhaustive, because new modules can re-export the binding).}
@defstruct[(procedure-index-desc exported-index-desc) ()]{
@defstruct[(form-index-desc exported-index-desc) ()]{
Indicates that the index entry corresponds to the definition of a
syntactic form via @scheme[defform] and company.}

View File

@ -377,6 +377,12 @@ Parameter that controls the amount of space used between lines by
@scheme[para], @scheme[item], and @scheme[subitem].}
@defparam[current-para-width n nonnegative-exact-integer?]{
Parameter that controls the width of a pict created by
@scheme[para], @scheme[item], and @scheme[subitem].}
@defparam[current-title-color color (or/c string? (is-a?/c color%))]{
Parameter used by the default @scheme[current-titlet] to colorize the