Finish converting scheme' -> racket'.

Everything compiles fine now even if the compatibility bindings are
gone.
This commit is contained in:
Eli Barzilay 2011-06-27 22:24:08 -04:00
parent 359ac41a45
commit a38f384a00
60 changed files with 287 additions and 277 deletions

View File

@ -45,16 +45,16 @@ die @italic{n} Kategorien hat, sieht folgendermaßen aus:
(define proc (define proc
(lambda (a) (lambda (a)
(cond (cond
(#,(elem (scheme test) (subscript "1")) ...) (#,(elem @racket[test] @subscript{1}) ...)
... ...
(#,(elem (scheme test) (subscript "n")) ...)))) (#,(elem @racket[test] @subscript{n}) ...))))
] ]
Dabei ist @racket[sig] die Signatur, den die Elemente der Sorte erfüllen müssen. Dabei ist @racket[sig] die Signatur, den die Elemente der Sorte erfüllen müssen.
Die @elem[(scheme test) (subscript "i")] müssen Tests sein, welche die einzelnen Kategorien Die @elem[@racket[test] @subscript{i}] müssen Tests sein, welche die einzelnen Kategorien
erkennen. Sie sollten alle Kategorien abdecken. erkennen. Sie sollten alle Kategorien abdecken.
Der letzte Zweig kann auch ein @racket[else]-Zweig sein, falls Der letzte Zweig kann auch ein @racket[else]-Zweig sein, falls
klar ist, daß @racket[a] zum letzten Fall gehört, wenn alle vorherigen klar ist, daß @racket[a] zum letzten Fall gehört, wenn alle vorherigen
@elem[(scheme test) (subscript "i")] @racket[#f] ergeben haben. @elem[@racket[test] @subscript{i}] @racket[#f] ergeben haben.
Anschließend werden die Zweige vervollständigt. Anschließend werden die Zweige vervollständigt.
Bei Fallunterscheidungen mit zwei Kategorien kann auch @racket[if] Bei Fallunterscheidungen mit zwei Kategorien kann auch @racket[if]
@ -68,40 +68,40 @@ anfängt:
@racketblock[ @racketblock[
(code:comment @#,t{Ein @racket[x] besteht aus / hat:}) (code:comment @#,t{Ein @racket[x] besteht aus / hat:})
(code:comment @#,t{- @racket[#,(elem (scheme Feld) (subscript "1"))] @racket[(#,(elem (scheme sig) (subscript "1")))]}) (code:comment @#,t{- @racket[#,(elem @racket[Feld] @subscript{1})] @racket[(#,(elem @racket[sig] @subscript{1}))]})
(code:comment @#,t{...}) (code:comment @#,t{...})
(code:comment @#,t{- @racket[#,(elem (scheme Feld) (subscript "n"))] @racket[(#,(elem (scheme sig) (subscript "n")))]}) (code:comment @#,t{- @racket[#,(elem @racket[Feld] @subscript{n})] @racket[(#,(elem @racket[sig] @subscript{n}))]})
] ]
Dabei ist @racket[x] ein umgangssprachlicher Name für die Sorte Dabei ist @racket[x] ein umgangssprachlicher Name für die Sorte
(``Schokokeks''), die @elem[(scheme Feld) (subscript "i")] sind (``Schokokeks''), die @elem[@racket[Feld] @subscript{i}] sind
umgangssprachliche Namen und kurze Beschreibungen der Komponenten umgangssprachliche Namen und kurze Beschreibungen der Komponenten
und die @elem[(scheme sig) (subscript "i")] die dazugehörigen Signaturen. und die @elem[@racket[sig] @subscript{i}] die dazugehörigen Signaturen.
Übersetzen Sie die Datendefinition in eine Record-Definition, indem Sie Übersetzen Sie die Datendefinition in eine Record-Definition, indem Sie
auch Namen für die Record-Signatur @racket[sig], Konstruktor @racket[constr], auch Namen für die Record-Signatur @racket[sig], Konstruktor @racket[constr],
Prädikat @racket[pred?] und die Selektoren @elem[(scheme select) (subscript "i")] Prädikat @racket[pred?] und die Selektoren @elem[@racket[select] @subscript{i}]
wählen: wählen:
@racketblock[ @racketblock[
(define-record-procedures sig (define-record-procedures sig
constr pred? constr pred?
(#,(elem (scheme select) (subscript "1")) ... #,(elem (scheme select) (subscript "n")))) (#,(elem @racket[select] @subscript{1}) ... #,(elem @racket[select] @subscript{n})))
] ]
Schreiben Sie außerdem eine Signatur für den Konstruktor der Schreiben Sie außerdem eine Signatur für den Konstruktor der
Form: Form:
@racketblock[ @racketblock[
(: constr (#,(elem (scheme sig) (subscript "1")) ... #,(elem (scheme sig) (subscript "n")) -> sig)) (: constr (#,(elem @racket[sig] @subscript{1}) ... #,(elem @racket[sig] @subscript{n}) -> sig))
] ]
Ggf. schreiben Sie außerdem Signaturen für das Prädikat und die Selektoren: Ggf. schreiben Sie außerdem Signaturen für das Prädikat und die Selektoren:
@racketblock[ @racketblock[
(: pred? (any -> boolean)) (: pred? (any -> boolean))
(: #,(elem (scheme select) (subscript "1")) (sig -> #,(elem (scheme sig) (subscript "1")))) (: #,(elem @racket[select] @subscript{1}) (sig -> #,(elem @racket[sig] @subscript{1})))
... ...
(: #,(elem (scheme select) (subscript "n")) (sig -> #,(elem (scheme sig) (subscript "n")))) (: #,(elem @racket[select] @subscript{n}) (sig -> #,(elem @racket[sig] @subscript{n})))
] ]
@section{zusammengesetzte Daten als Argumente} @section{zusammengesetzte Daten als Argumente}
@ -126,15 +126,15 @@ eine Datendefinition der Form:
@racketblock[ @racketblock[
(code:comment @#,t{Ein @racket[x] ist eins der Folgenden:}) (code:comment @#,t{Ein @racket[x] ist eins der Folgenden:})
(code:comment @#,t{- @elem[(scheme Sorte) (subscript "1")] (@elem[(scheme sig) (subscript "1")])}) (code:comment @#,t{- @elem[@racket[Sorte] @subscript{1}] (@elem[@racket[sig] @subscript{1}])})
(code:comment @#,t{...}) (code:comment @#,t{...})
(code:comment @#,t{- @elem[(scheme Sorte) (subscript "n")] (@elem[(scheme sig) (subscript "n")])}) (code:comment @#,t{- @elem[@racket[Sorte] @subscript{n}] (@elem[@racket[sig] @subscript{n}])})
(code:comment @#,t{Name: @racket[sig]}) (code:comment @#,t{Name: @racket[sig]})
] ]
Dabei sind die @elem[(scheme Sorte) (subscript "i")] umgangssprachliche Namen Dabei sind die @elem[@racket[Sorte] @subscript{i}] umgangssprachliche Namen
für die möglichen Sorten, die ein Wert aus diesen gemischten Daten für die möglichen Sorten, die ein Wert aus diesen gemischten Daten
annehmen kann. Die @elem[(scheme sig) (subscript "i")] sind die zu den Sorten annehmen kann. Die @elem[@racket[sig] @subscript{i}] sind die zu den Sorten
gehörenden Signaturen. Der Name @racket[sig] ist für die Verwendung als gehörenden Signaturen. Der Name @racket[sig] ist für die Verwendung als
Signatur. Signatur.
@ -143,13 +143,13 @@ Aus der Datendefinition entsteht eine Signaturdefinition folgender Form:
@racketblock[ @racketblock[
(define sig (define sig
(signature (signature
(mixed #,(elem (scheme sig) (subscript "1")) (mixed #,(elem @racket[sig] @subscript{1})
... ...
#,(elem (scheme sig) (subscript "n"))))) #,(elem @racket[sig] @subscript{n}))))
] ]
Wenn die Prädikate für die einzelnen Sorten @elem[(scheme pred?) Wenn die Prädikate für die einzelnen Sorten @elem[@racket[pred?]
(subscript "1")] ... @elem[(scheme pred?) (subscript "n")] heißen, hat die @subscript{1}] ... @elem[@racket[pred?] @subscript{n}] heißen, hat die
Schablone für eine Prozedur, die gemischte Daten konsumiert, die Schablone für eine Prozedur, die gemischte Daten konsumiert, die
folgende Form: folgende Form:
@ -159,9 +159,9 @@ folgende Form:
(define proc (define proc
(lambda (a) (lambda (a)
(cond (cond
((#,(elem (scheme pred?) (subscript "1")) a) ...) ((#,(elem @racket[pred?] @subscript{1}) a) ...)
... ...
((#,(elem (scheme pred?) (subscript "n")) a) ...)))) ((#,(elem @racket[pred?] @subscript{n}) a) ...))))
] ]
Die rechten Seiten der Zweige werden dann nach den Die rechten Seiten der Zweige werden dann nach den
@ -342,13 +342,14 @@ veränderbares Feld steht:
@racketblock[ @racketblock[
(define-record-procedures-2 sig (define-record-procedures-2 sig
constr pred? constr pred?
(#,(elem (scheme select) (subscript "1")) ... (#,(elem (scheme s) (subscript "k")) #,(elem (scheme mutate) (subscript "k"))) ... #,(elem (scheme s) (subscript "n")))) (#,(elem @racket[select] @subscript{1}) ... (#,(elem @racket[s] @subscript{k}) #,(elem @racket[mutate] @subscript{k})) ... #,(elem @racket[s] @subscript{n})))
] ]
In der Schablone für Prozeduren, die den Zustand eines In der Schablone für Prozeduren, die den Zustand eines Record-Arguments
Record-Arguments @racket[r] ändern, benutzen Sie den dazugehörigen Mutator @racket[r] ändern, benutzen Sie den dazugehörigen Mutator
@elem[(scheme mutate) (subscript "k")] Wenn @racket[a] der Ausdruck für den neuen Wert der Komponente ist, @elem[@racket[mutate] @subscript{k}] Wenn @racket[a] der Ausdruck für
sieht der Aufruf folgendermaßen aus: @racket[(#,(elem (scheme mutate) (subscript "k")) r a)]. den neuen Wert der Komponente ist, sieht der Aufruf folgendermaßen aus:
@racket[(#,(elem @racket[mutate] @subscript{k}) r a)].
Um mehrere Komponenten in einer Prozedur zu verändern, oder um einen Um mehrere Komponenten in einer Prozedur zu verändern, oder um einen
sinnvollen Rückgabewert nach einer Mutation zu liefern, benutzen Sie sinnvollen Rückgabewert nach einer Mutation zu liefern, benutzen Sie

View File

@ -26,55 +26,55 @@
expr expr
test-case test-case
#;library-require] #;library-require]
[definition @#,scheme[(define id expr)] [definition @#,racket[(define id expr)]
@#,scheme[(define-record-procedures id id id (id (... ...)))] @#,racket[(define-record-procedures id id id (id (... ...)))]
@#,scheme[(define-record-procedures-parametric (id id (... ...)) id id (id (... ...)))] @#,racket[(define-record-procedures-parametric (id id (... ...)) id id (id (... ...)))]
@#,scheme[(: id sig)] @#,racket[(: id sig)]
def-rule ...] def-rule ...]
prod ... prod ...
[expr @#,scheme[(code:line (expr expr (... ...)) (code:comment @#,seclink["application"]{Prozedurapplikation}))] [expr @#,racket[(code:line (expr expr (... ...)) (code:comment @#,seclink["application"]{Prozedurapplikation}))]
@#,scheme[#t] @#,racket[#t]
@#,scheme[#f] @#,racket[#f]
@#,scheme[number] @#,racket[number]
@#,scheme[string] @#,racket[string]
@#,scheme[(lambda (id (... ...)) expr)] @#,racket[(lambda (id (... ...)) expr)]
@#,scheme[(code:line id (code:comment @#,seclink["id"]{Bezeichner}))] @#,racket[(code:line id (code:comment @#,seclink["id"]{Bezeichner}))]
@#,scheme[(cond (expr expr) (expr expr) (... ...))] @#,racket[(cond (expr expr) (expr expr) (... ...))]
@#,scheme[(cond (expr expr) (... ...) (else expr))] @#,racket[(cond (expr expr) (... ...) (else expr))]
@#,scheme[(if expr expr)] @#,racket[(if expr expr)]
@#,scheme[(and expr (... ...))] @#,racket[(and expr (... ...))]
@#,scheme[(or expr (... ...))] @#,racket[(or expr (... ...))]
@#,scheme[(let ((id expr) (... ...)) expr)] @#,racket[(let ((id expr) (... ...)) expr)]
@#,scheme[(letrec ((id expr) (... ...)) expr)] @#,racket[(letrec ((id expr) (... ...)) expr)]
@#,scheme[(let* ((id expr) (... ...)) expr) ] @#,racket[(let* ((id expr) (... ...)) expr) ]
@#,scheme[(begin expr expr (... ...))] @#,racket[(begin expr expr (... ...))]
@#,scheme[(signature sig)] @#,racket[(signature sig)]
@#,scheme[(for-all ((id sig) (... ...)) expr)] @#,racket[(for-all ((id sig) (... ...)) expr)]
@#,scheme[(==> expr expr)] @#,racket[(==> expr expr)]
expr-rule ...] expr-rule ...]
[sig id [sig id
@#,scheme[(predicate expr)] @#,racket[(predicate expr)]
@#,scheme[(one-of expr (... ...))] @#,racket[(one-of expr (... ...))]
@#,scheme[(mixed sig (... ...))] @#,racket[(mixed sig (... ...))]
@#,scheme[(code:line (sig (... ...) -> sig) (code:comment @#,seclink["proc-signature"]{Prozedur-Signatur}))] @#,racket[(code:line (sig (... ...) -> sig) (code:comment @#,seclink["proc-signature"]{Prozedur-Signatur}))]
@#,scheme[(list sig)] @#,racket[(list sig)]
@#,scheme[(code:line %a %b %c (code:comment @#,seclink["signature-variable"]{Signatur-Variable}))] @#,racket[(code:line %a %b %c (code:comment @#,seclink["signature-variable"]{Signatur-Variable}))]
@#,scheme[(combined sig (... ...))] @#,racket[(combined sig (... ...))]
@#,scheme[signature] @#,racket[signature]
] ]
[test-case @#,scheme[(check-expect expr expr)] [test-case @#,racket[(check-expect expr expr)]
@#,scheme[(check-within expr expr expr)] @#,racket[(check-within expr expr expr)]
@#,scheme[(check-member-of expr expr (... ...))] @#,racket[(check-member-of expr expr (... ...))]
@#,scheme[(check-range expr expr expr)] @#,racket[(check-range expr expr expr)]
@#,scheme[(check-error expr expr)] @#,racket[(check-error expr expr)]
@#,scheme[(check-property expr)]] @#,racket[(check-property expr)]]
#;(... #;(...
[library-require @#,scheme[(require string)] [library-require @#,racket[(require string)]
@#,scheme[(require module-id)] @#,racket[(require module-id)]
@#,scheme[(require (lib string string ...))] @#,racket[(require (lib string string ...))]
@#,scheme[(require (planet string package))]]) @#,racket[(require (planet string package))]])
#;(... #;(...
[package @#,scheme[(string string number number)]]))) [package @#,racket[(string string number number)]])))
(define prim-nonterms (define prim-nonterms
(make-splice (make-splice

View File

@ -72,7 +72,7 @@ all of the names in the tools library, for use defining keybindings
[_ [_
(raise-syntax-error 'provide/dr/doc "unknown thing" case)])]) (raise-syntax-error 'provide/dr/doc "unknown thing" case)])])
(with-syntax ([mid (munge-id #'id)]) (with-syntax ([mid (munge-id #'id)])
#'(thing-doc mid ctc ("This is provided for backwards compatibility; new code should use " (scheme id) " instead."))))) #'(thing-doc mid ctc ("This is provided for backwards compatibility; new code should use " (racket id) " instead.")))))
(syntax->list #'(case ...)))])]) (syntax->list #'(case ...)))])])
(syntax-case stx () (syntax-case stx ()
[(_ rst ...) [(_ rst ...)

View File

@ -9,11 +9,11 @@
@(define-syntax-rule (def-mz id) @(define-syntax-rule (def-mz id)
(begin (begin
(require (for-label mzscheme)) (require (for-label mzscheme))
(define id (scheme provide)))) (define id (racket provide))))
@(def-mz mzscheme-provide) @(def-mz mzscheme-provide)
@(define-syntax-rule (reprovide id ...) @(define-syntax-rule (reprovide id ...)
(*threecolumns (list (scheme id) ... 'nbsp 'nbsp))) (*threecolumns (list (racket id) ... 'nbsp 'nbsp)))
@(define (*threecolumns l) @(define (*threecolumns l)
(let* ([len (length l)] (let* ([len (length l)]
[third (quotient len 3)] [third (quotient len 3)]

View File

@ -1083,7 +1083,7 @@ coordinates. In particular, they are off by
in order to keep the computations and test cases simple in order to keep the computations and test cases simple
and using exact numbers. and using exact numbers.
A more precise approximation would be A more precise approximation would be
@(scheme #,(sin (/ pi 3))), but it is not necessary at @(racket #,(sin (/ pi 3))), but it is not necessary at
the screen resolution. the screen resolution.
@chunk[<cell-center-y> @chunk[<cell-center-y>

View File

@ -14,7 +14,7 @@
(define-syntax-rule (intro mz-id) (define-syntax-rule (intro mz-id)
(begin (begin
(require (for-label (only-in mod id))) (require (for-label (only-in mod id)))
(define mz-id (scheme id)))) (define mz-id (racket id))))
(intro in-mz-id))) (intro in-mz-id)))
@(define-syntax-rule (defprocthing* mod id ...) @(define-syntax-rule (defprocthing* mod id ...)

View File

@ -18,15 +18,15 @@
(to-flow @emph{value}))) (to-flow @emph{value})))
(list (list
(list (to-flow spacer) (list (to-flow spacer)
(to-flow (scheme 'name)) (to-flow (racket 'name))
(to-flow spacer) (to-flow spacer)
(to-flow (scheme 'option0)) (to-flow (racket 'option0))
(to-flow spacer) (to-flow spacer)
(make-flow (list (racketblock0 contract0)))) (make-flow (list (racketblock0 contract0))))
(list (to-flow spacer) (list (to-flow spacer)
(to-flow spacer) (to-flow spacer)
(to-flow spacer) (to-flow spacer)
(to-flow (scheme 'option)) (to-flow (racket 'option))
(to-flow spacer) (to-flow spacer)
(make-flow (list (racketblock0 contract)))) (make-flow (list (racketblock0 contract))))
...) ...)

View File

@ -16,6 +16,6 @@
(with-syntax ([lib (string->symbol (with-syntax ([lib (string->symbol
(format "mzlib/~a" (syntax-e #'name)))]) (format "mzlib/~a" (syntax-e #'name)))])
#'(begin #'(begin
(section #:style 'hidden (scheme lib)) (section #:style 'hidden (racket lib))
(defmodule lib)))] (defmodule lib)))]
[(_ name) #'(mzlib #:mode section name)])) [(_ name) #'(mzlib #:mode section name)]))

View File

@ -16,8 +16,8 @@
(define-syntax-rule (bind id else-id) (define-syntax-rule (bind id else-id)
(begin (begin
(require (for-label scheme/base)) (require (for-label scheme/base))
(define id (scheme lambda)) (define id (racket lambda))
(define else-id (scheme else)))) (define else-id (racket else))))
(bind base-lambda base-else)) (bind base-lambda base-else))
@mzlib[#:mode title etc] @mzlib[#:mode title etc]
@ -262,7 +262,7 @@ no filename is available, the result is @racket[#f].}
@defform[#:literals (quote unsyntax scheme) @defform[#:literals (quote unsyntax scheme)
(hash-table (#,(scheme quote) flag) ... (key-expr val-expr) ...)]{ (hash-table (#,(racket quote) flag) ... (key-expr val-expr) ...)]{
Creates a new hash-table providing the quoted flags (if any) to Creates a new hash-table providing the quoted flags (if any) to
@racket[make-hash-table], and then mapping each key to the @racket[make-hash-table], and then mapping each key to the

View File

@ -13,7 +13,7 @@
(define-syntax-rule (bind id) (define-syntax-rule (bind id)
(begin (begin
(require (for-label scheme/base)) (require (for-label scheme/base))
(define id (scheme lambda)))) (define id (racket lambda))))
(bind base-lambda)) (bind base-lambda))
@mzlib[#:mode title kw] @mzlib[#:mode title kw]

View File

@ -6,7 +6,7 @@
(define-syntax-rule (bind id) (define-syntax-rule (bind id)
(begin (begin
(require (for-label scheme/gui/base)) (require (for-label scheme/gui/base))
(define id (scheme send-event)))) (define id (racket send-event))))
(bind mred-send-event)) (bind mred-send-event))
@mzlib[#:mode title sendevent] @mzlib[#:mode title sendevent]

View File

@ -23,21 +23,21 @@
base-free-transformer-identifier=? base-free-label-identifier=?) base-free-transformer-identifier=? base-free-label-identifier=?)
(begin (begin
(require (for-label scheme/base)) (require (for-label scheme/base))
(define base-define (scheme define)) (define base-define (racket define))
(define base-define-syntax (scheme define-syntax)) (define base-define-syntax (racket define-syntax))
(define base-define-for-syntax (scheme define-for-syntax)) (define base-define-for-syntax (racket define-for-syntax))
(define base-define-struct (scheme define-struct)) (define base-define-struct (racket define-struct))
(define base-if (scheme if)) (define base-if (racket if))
(define base-cond (scheme cond)) (define base-cond (racket cond))
(define base-case (scheme case)) (define base-case (racket case))
(define base-top-interaction (scheme #%top-interaction)) (define base-top-interaction (racket #%top-interaction))
(define base-open-input-file (scheme open-input-file)) (define base-open-input-file (racket open-input-file))
(define base-apply (scheme apply)) (define base-apply (racket apply))
(define base-prop:procedure (scheme prop:procedure)) (define base-prop:procedure (racket prop:procedure))
(define base-free-identifier=? (scheme free-identifier=?)) (define base-free-identifier=? (racket free-identifier=?))
(define base-free-template-identifier=? (scheme free-template-identifier=?)) (define base-free-template-identifier=? (racket free-template-identifier=?))
(define base-free-transformer-identifier=? (scheme free-transformer-identifier=?)) (define base-free-transformer-identifier=? (racket free-transformer-identifier=?))
(define base-free-label-identifier=? (scheme free-label-identifier=?)))) (define base-free-label-identifier=? (racket free-label-identifier=?))))
@(def-base base-define base-define-syntax base-define-for-syntax base-define-struct @(def-base base-define base-define-syntax base-define-for-syntax base-define-struct
base-if base-cond base-case base-top-interaction base-if base-cond base-case base-top-interaction
base-open-input-file base-apply base-prop:procedure base-open-input-file base-apply base-prop:procedure

View File

@ -25,15 +25,15 @@
(list (to-flow spacer) (list (to-flow spacer)
(to-flow sec) (to-flow sec)
(to-flow spacer) (to-flow spacer)
(to-flow (scheme sym0)) (to-flow (racket sym0))
(to-flow spacer) (to-flow spacer)
(to-flow (scheme flag0))) (to-flow (racket flag0)))
(list (to-flow spacer) (list (to-flow spacer)
(to-flow spacer) (to-flow spacer)
(to-flow spacer) (to-flow spacer)
(to-flow (scheme sym)) (to-flow (racket sym))
(to-flow spacer) (to-flow spacer)
(to-flow (scheme flag))) (to-flow (racket flag)))
...)) ...))
...)))) ...))))
@ -317,7 +317,7 @@ Pending expunges must be handled before calling this function; see
)]{ )]{
An IMAP flag is a symbol, but it is generally not a convenient one to An IMAP flag is a symbol, but it is generally not a convenient one to
use within a Scheme program, because it usually starts with a use within a Racket program, because it usually starts with a
backslash. The @racket[imap-flag->symbol] and backslash. The @racket[imap-flag->symbol] and
@racket[symbol->imap-flag] procedures convert IMAP flags to convenient @racket[symbol->imap-flag] procedures convert IMAP flags to convenient
symbols and vice-versa: symbols and vice-versa:

View File

@ -10,14 +10,14 @@
#f #f
(append (append
(list (list
(list (to-flow (scheme 'type)) (list (to-flow (racket 'type))
(to-flow spacer) (to-flow spacer)
(to-flow (scheme 'sub-type0)) (to-flow (racket 'sub-type0))
(to-flow spacer) (to-flow spacer)
(to-flow ref0)) (to-flow ref0))
(list (to-flow spacer) (list (to-flow spacer)
(to-flow spacer) (to-flow spacer)
(to-flow (scheme 'sub-type)) (to-flow (racket 'sub-type))
(to-flow spacer) (to-flow spacer)
(to-flow ref)) (to-flow ref))
...) ...)

View File

@ -153,21 +153,21 @@ Raised when the server produces a malformed response.}
@racketblock[ @racketblock[
#,pt (require net/pop3) #,pt (require net/pop3)
#,pt (define c (connect-to-server "cs.rice.edu")) #,pt (define c (connect-to-server "foo.bar.com"))
#,pt (authenticate/plain-text "scheme" "********" c) #,pt (authenticate/plain-text "bob" "********" c)
#,pt (get-mailbox-status c) #,pt (get-mailbox-status c)
196 196
816400 816400
#,pt (get-message/headers c 100) #,pt (get-message/headers c 100)
("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)" ("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)"
"Message-Id: <199711061834.MAA11961@new-world.cs.rice.edu>" "Message-Id: <199711061834.MAA11961@foo.bar.com>"
"From: Shriram Krishnamurthi <shriram@cs.rice.edu>" "From: Alice <alice@foo.bar.com>"
.... ....
"Status: RO") "Status: RO")
#,pt (get-message/complete c 100) #,pt (get-message/complete c 100)
("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)" ("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)"
"Message-Id: <199711061834.MAA11961@new-world.cs.rice.edu>" "Message-Id: <199711061834.MAA11961@foo.bar.com>"
"From: Shriram Krishnamurthi <shriram@cs.rice.edu>" "From: Alice <alice@foo.bar.com>"
.... ....
"Status: RO") "Status: RO")
("some body" "text" "goes" "." "here" "." "") ("some body" "text" "goes" "." "here" "." "")

View File

@ -395,4 +395,3 @@ except @racket[current-https-protocol]. Note that the exports of
@defsignature[url+scheme^ (url^)]{ @defsignature[url+scheme^ (url^)]{
Adds @racket[current-connect-scheme] to @racket[url^].} Adds @racket[current-connect-scheme] to @racket[url^].}

View File

@ -62,7 +62,7 @@
(list (make-toc-element (list (make-toc-element
#f #f
(list (elemtag '(chunk tag) (list (elemtag '(chunk tag)
(bold (italic (scheme name)) " ::="))) (bold (italic (racket name)) " ::=")))
(list (smaller (elemref '(chunk tag) #:underline? #f (list (smaller (elemref '(chunk tag) #:underline? #f
str str
rest ...)))) rest ...))))

View File

@ -412,7 +412,7 @@
(case (syntax-e #'mode) (case (syntax-e #'mode)
[(pubment) [(pubment)
#'((t "Refine this method with " #'((t "Refine this method with "
(scheme augment) "."))] (racket augment) "."))]
[(override override-final extend augment) [(override override-final extend augment)
#`((t (case (syntax-e #'mode) #`((t (case (syntax-e #'mode)
[(override override-final) "Overrides "] [(override override-final) "Overrides "]

View File

@ -17,7 +17,7 @@
(*method 'b (quote-syntax a))) (*method 'b (quote-syntax a)))
(define-syntax-rule (xmethod a b) (define-syntax-rule (xmethod a b)
(elem (method a b) " in " (scheme a))) (elem (method a b) " in " (racket a)))
(define (*method sym id) (define (*method sym id)
(**method sym id)) (**method sym id))

View File

@ -28,7 +28,8 @@
(list . content) (list . content)
req)] req)]
[(_ (name ...) . content) [(_ (name ...) . content)
(defmodule*/no-declare #:require-form (scheme require) (name ...) . content)])) (defmodule*/no-declare #:require-form (racket require) (name ...)
. content)]))
(define-syntax defmodule* (define-syntax defmodule*
(syntax-rules () (syntax-rules ()
@ -38,7 +39,8 @@
[(_ #:require-form req (name ...) . content) [(_ #:require-form req (name ...) . content)
(defmodule* #:require-form req (name ...) #:use-sources () . content)] (defmodule* #:require-form req (name ...) #:use-sources () . content)]
[(_ (name ...) #:use-sources (pname ...) . content) [(_ (name ...) #:use-sources (pname ...) . content)
(defmodule* #:require-form (scheme require) (name ...) #:use-sources (pname ...) . content)] (defmodule* #:require-form (racket require) (name ...) #:use-sources (pname ...)
. content)]
[(_ (name ...) . content) [(_ (name ...) . content)
(defmodule* (name ...) #:use-sources () . content)])) (defmodule* (name ...) #:use-sources () . content)]))

View File

@ -71,11 +71,11 @@
[(->d (req ...) () (values [name res] ...)) [(->d (req ...) () (values [name res] ...))
#'((id req ...) (values res ...) ())] #'((id req ...) (values res ...) ())]
[(->d (req ...) () #:pre-cond condition (values [name res] ...)) [(->d (req ...) () #:pre-cond condition (values [name res] ...))
#'((id req ...) (values res ...) ((bold "Pre-condition: ") (scheme condition) "\n" "\n"))] #'((id req ...) (values res ...) ((bold "Pre-condition: ") (racket condition) "\n" "\n"))]
[(->d (req ...) () [name res]) [(->d (req ...) () [name res])
#'((id req ...) res ())] #'((id req ...) res ())]
[(->d (req ...) () #:pre-cond condition [name res]) [(->d (req ...) () #:pre-cond condition [name res])
#'((id req ...) res ((bold "Pre-condition: ") (scheme condition) "\n" "\n" ))] #'((id req ...) res ((bold "Pre-condition: ") (racket condition) "\n" "\n" ))]
[(->d (req ...) () #:rest rest rest-ctc [name res]) [(->d (req ...) () #:rest rest rest-ctc [name res])
#'((id req ... [rest rest-ctc] (... ...)) res ())] #'((id req ... [rest rest-ctc] (... ...)) res ())]
[(->d (req ...) (one more ...) whatever) [(->d (req ...) (one more ...) whatever)
@ -99,7 +99,7 @@
[(->i (req ...) () #:pre (pre-id ...) condition (values ress ...)) [(->i (req ...) () #:pre (pre-id ...) condition (values ress ...))
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))] (with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[([name res] ...) (map remove->i-deps (syntax->list #'(req ...)))]) [([name res] ...) (map remove->i-deps (syntax->list #'(req ...)))])
#'((id req ...) (values res ...) ((bold "Pre-condition: ") (scheme condition) "\n" "\n")))] #'((id req ...) (values res ...) ((bold "Pre-condition: ") (racket condition) "\n" "\n")))]
[(->i (req ...) () res) [(->i (req ...) () res)
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))] (with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[name res] (remove->i-deps #'res)]) [[name res] (remove->i-deps #'res)])
@ -107,7 +107,7 @@
[(->i (req ...) () #:pre (pre-id ...) condition [name res]) [(->i (req ...) () #:pre (pre-id ...) condition [name res])
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))] (with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[name res] (remove->i-deps #'res)]) [[name res] (remove->i-deps #'res)])
#'((id req ...) res ((bold "Pre-condition: ") (scheme condition) "\n" "\n" )))] #'((id req ...) res ((bold "Pre-condition: ") (racket condition) "\n" "\n" )))]
[(->i (req ...) () #:rest rest res) [(->i (req ...) () #:rest rest res)
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))] (with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[name res] (remove->i-deps #'res)] [[name res] (remove->i-deps #'res)]

View File

@ -135,8 +135,8 @@ Gets the command used to view a PostScript file for X. The default is
[y (box/c (and/c real? (not/c negative?)))]) [y (box/c (and/c real? (not/c negative?)))])
void?]{ void?]{
Gets the scaling factor for PostScript output. @boxisfill[(scheme x) Gets the scaling factor for PostScript output. @boxisfill[@racket[x]
@elem{the horizontal scaling factor}] @boxisfill[(scheme y) @elem{the @elem{the horizontal scaling factor}] @boxisfill[@racket[y] @elem{the
vertical scaling factor}] The default is @racket[0.8] by vertical scaling factor}] The default is @racket[0.8] by
@racket[0.8]. @racket[0.8].

View File

@ -37,7 +37,7 @@ The other options support further wrapping and configuration:
@item{The @racket[#:make-fail] and @racket[#:fail] options are @item{The @racket[#:make-fail] and @racket[#:fail] options are
mutually exclusive; if @racket[_make-fail-expr] is provided, it mutually exclusive; if @racket[_make-fail-expr] is provided, it
is applied to @racket['@#,scheme[_id]] to obtain the last is applied to @racket['@#,racket[_id]] to obtain the last
argument to @racket[get-ffi-obj]; if @racket[_fail-expr] is argument to @racket[get-ffi-obj]; if @racket[_fail-expr] is
provided, it is supplied directly as the last argument to provided, it is supplied directly as the last argument to
@racket[get-ffi-obj]. The @racket[make-not-available] function @racket[get-ffi-obj]. The @racket[make-not-available] function

View File

@ -18,7 +18,7 @@ for @racket[make-bytes].
(syntax-case stx () (syntax-case stx ()
[(_ id elem) [(_ id elem)
#'(srfi-4-vector/desc id elem make-splice #'(srfi-4-vector/desc id elem make-splice
"Like " (scheme make-vector) ", etc., but for " (scheme elem) " elements.")])) "Like " (racket make-vector) ", etc., but for " (racket elem) " elements.")]))
(define-syntax (srfi-4-vector/desc stx) (define-syntax (srfi-4-vector/desc stx)
(syntax-case stx () (syntax-case stx ()
[(_ id elem extra desc ...) [(_ id elem extra desc ...)
@ -57,7 +57,8 @@ for @racket[make-bytes].
desc ... desc ...
(extra (extra
(list (list
" The " (scheme ->cpointer) " function extracts a plain pointer to the underlying array."))) " The " (racket ->cpointer)
" function extracts a plain pointer to the underlying array.")))
;; Big pain: make up relatively-correct source locations ;; Big pain: make up relatively-correct source locations
;; for pieces in the _vec definition: ;; for pieces in the _vec definition:
(defform* [#,(datum->syntax (defform* [#,(datum->syntax
@ -90,7 +91,8 @@ for @racket[make-bytes].
(sub1 (syntax-position #'vec)) (sub1 (syntax-position #'vec))
10)) 10))
_vec] _vec]
"Like " (scheme _cvector) ", but for vectors of " (scheme elem) " elements."))))]))) "Like " (racket _cvector) ", but for vectors of "
(racket elem) " elements."))))])))
@srfi-4-vector/desc[u8 _uint8 (lambda (x) (make-splice null))]{ @srfi-4-vector/desc[u8 _uint8 (lambda (x) (make-splice null))]{

View File

@ -16,9 +16,9 @@ get-background-add].
void?]{ void?]{
Gets all of the additive values. Gets all of the additive values.
@boxisfill[(scheme r) @elem{the additive value for the red component of the color}] @boxisfill[@racket[r] @elem{the additive value for the red component of the color}]
@boxisfill[(scheme g) @elem{the additive value for the green component of the color}] @boxisfill[@racket[g] @elem{the additive value for the green component of the color}]
@boxisfill[(scheme b) @elem{the additive value for the blue component of the color}] @boxisfill[@racket[b] @elem{the additive value for the blue component of the color}]
} }
@defmethod[(get-b) @defmethod[(get-b)

View File

@ -1,4 +1,4 @@
#readerscribble/reader #reader scribble/reader
(module blurbs scheme/base (module blurbs scheme/base
(require scribble/struct (require scribble/struct
scribble/manual scribble/manual
@ -47,13 +47,13 @@
(define-syntax bitmaplabeluse (define-syntax bitmaplabeluse
(syntax-rules () (syntax-rules ()
[(_ id) @bitmapuseinfo["If" (scheme id) "a bitmap" " and" "the"]])) [(_ id) @bitmapuseinfo["If" @racket[id] "a bitmap" " and" "the"]]))
(define-syntax bitmaplabelusearray (define-syntax bitmaplabelusearray
(syntax-rules () (syntax-rules ()
[(_ id) @bitmapuseinfo["If" (scheme id) "a list of bitmaps" " and" "a"]])) [(_ id) @bitmapuseinfo["If" @racket[id] "a list of bitmaps" " and" "a"]]))
(define-syntax bitmaplabeluseisbm (define-syntax bitmaplabeluseisbm
(syntax-rules () (syntax-rules ()
[(_ id) @bitmapuseinfo["Since" (scheme id) "a bitmap" "" "the"]])) [(_ id) @bitmapuseinfo["Since" @racket[id] "a bitmap" "" "the"]]))
(define bitmapiforiglabel (define bitmapiforiglabel
@elem{The bitmap label is installed only @elem{The bitmap label is installed only

View File

@ -30,7 +30,9 @@ Whenever a check box is clicked by the user, the check box's value is
Creates a check box with a string or bitmap label. @bitmaplabeluse[label] Creates a check box with a string or bitmap label. @bitmaplabeluse[label]
@labelstripped[(scheme label) @elem{ (when @racket[label] is a string)} @elem{effectively click the check box}] @labelstripped[@racket[label]
@elem{ (when @racket[label] is a string)}
@elem{effectively click the check box}]
The @racket[callback] procedure is called (with the event type The @racket[callback] procedure is called (with the event type
@indexed-racket['check-box]) whenever the user clicks the check box. @indexed-racket['check-box]) whenever the user clicks the check box.

View File

@ -37,7 +37,8 @@ See also @racket[list-box%].
Creates a choice item. If @racket[label] is a string, it is used as the Creates a choice item. If @racket[label] is a string, it is used as the
label for the choice item. label for the choice item.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the choice item}] @labelstripped[@racket[label]
@elem{} @elem{move the keyboard focus to the choice item}]
The @racket[choices] list specifies the initial list of user-selectable The @racket[choices] list specifies the initial list of user-selectable
items for the control. The initial set of choices determines the items for the control. The initial set of choices determines the

View File

@ -34,7 +34,8 @@ A @racket[combo-field%] object is a @racket[text-field%]
If @racket[label] is not @racket[#f], it is used as the combo label. If @racket[label] is not @racket[#f], it is used as the combo label.
Otherwise, the combo does not display its label. Otherwise, the combo does not display its label.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the combo}] @labelstripped[@racket[label]
@elem{} @elem{move the keyboard focus to the combo}]
The @racket[choices] list specifies the initial list of items for the The @racket[choices] list specifies the initial list of items for the
combo's popup menu. The combo's popup menu. The

View File

@ -39,8 +39,8 @@ The origin of the drawing context is also returned, translated into
returned origin is reliable only while the editor is being drawn, or returned origin is reliable only while the editor is being drawn, or
while it receives a mouse or keyboard event. while it receives a mouse or keyboard event.
@boxisfillnull[(scheme x) @elem{the x-origin of the DC in editor coordinates}] @boxisfillnull[@racket[x] @elem{the x-origin of the DC in editor coordinates}]
@boxisfillnull[(scheme y) @elem{the y-origin of the DC in editor coordinates}] @boxisfillnull[@racket[y] @elem{the y-origin of the DC in editor coordinates}]
See also @xmethod[editor<%> editor-location-to-dc-location] and See also @xmethod[editor<%> editor-location-to-dc-location] and
@xmethod[editor<%> dc-location-to-editor-location]. @xmethod[editor<%> dc-location-to-editor-location].
@ -100,10 +100,10 @@ The calculation of the editor's visible region is based on the current
is hidden, obscured by other windows, or moved off the edge of the is hidden, obscured by other windows, or moved off the edge of the
screen. screen.
@boxisfillnull[(scheme x) @elem{the left edge of the visible region in editor coordinates}] @boxisfillnull[@racket[x] @elem{the left edge of the visible region in editor coordinates}]
@boxisfillnull[(scheme y) @elem{the top edge of the visible region in editor coordinates}] @boxisfillnull[@racket[y] @elem{the top edge of the visible region in editor coordinates}]
@boxisfillnull[(scheme w) @elem{the width of the visible region, which may be larger than the editor itself}] @boxisfillnull[@racket[w] @elem{the width of the visible region, which may be larger than the editor itself}]
@boxisfillnull[(scheme h) @elem{the height of the visible region, which may be larger than the editor itself}] @boxisfillnull[@racket[h] @elem{the height of the visible region, which may be larger than the editor itself}]
If an editor is fully visible and @racket[full?] is @racket[#f], then If an editor is fully visible and @racket[full?] is @racket[#f], then
@racket[x] and @racket[y] will both be filled with @racket[0]. @racket[x] and @racket[y] will both be filled with @racket[0].

View File

@ -599,8 +599,8 @@ For a text editor, the reported descent includes the editor's
void?]{ void?]{
Gets the current extent of the editor's graphical representation. Gets the current extent of the editor's graphical representation.
@boxisfillnull[(scheme w) @elem{the editor's width}] @boxisfillnull[@racket[w] @elem{the editor's width}]
@boxisfillnull[(scheme h) @elem{the editor's height}] @boxisfillnull[@racket[h] @elem{the editor's height}]
For a text editor, the reported extent includes the editor's For a text editor, the reported extent includes the editor's
padding (see @method[text% set-padding]). padding (see @method[text% set-padding]).
@ -636,7 +636,7 @@ If the editor is displayed in a single canvas, then the canvas's
Returns the path name of the last file saved from or loaded into this Returns the path name of the last file saved from or loaded into this
editor, @racket[#f] if the editor has no filename. editor, @racket[#f] if the editor has no filename.
@boxisfill[(scheme temp) @elem{@racket[#t] if the filename is temporary or @boxisfill[@racket[temp] @elem{@racket[#t] if the filename is temporary or
@racket[#f] otherwise}] @racket[#f] otherwise}]
} }
@ -799,8 +799,8 @@ Returns @racket[#f].
Gets the @techlink{location} of the given snip. If the snip is found in Gets the @techlink{location} of the given snip. If the snip is found in
the editor, @racket[#t] is returned; otherwise, @racket[#f] is returned. the editor, @racket[#t] is returned; otherwise, @racket[#f] is returned.
@boxisfillnull[(scheme x) @elem{the x-coordinate of the snip's @techlink{location}}] @boxisfillnull[@racket[x] @elem{the x-coordinate of the snip's @techlink{location}}]
@boxisfillnull[(scheme y) @elem{the y-coordinate of the snip's @techlink{location}}] @boxisfillnull[@racket[y] @elem{the y-coordinate of the snip's @techlink{location}}]
If @racket[bottom-right?] is not @racket[#f], the values in the If @racket[bottom-right?] is not @racket[#f], the values in the
@racket[x] and @racket[y] boxes are for the snip's bottom right @racket[x] and @racket[y] boxes are for the snip's bottom right
@ -846,8 +846,8 @@ Returns the visible area into which the editor is currently being
displayed (according to the editor's administrator). See also displayed (according to the editor's administrator). See also
@method[editor-admin% get-view] . @method[editor-admin% get-view] .
@boxisfillnull[(scheme w) @elem{the visible area width}] @boxisfillnull[@racket[w] @elem{the visible area width}]
@boxisfillnull[(scheme h) @elem{the visible area height}] @boxisfillnull[@racket[h] @elem{the visible area height}]
@|OVD| @|OVD|
@ -865,9 +865,9 @@ Converts the given coordinates from top-level @techlink{display} coordinates
same calculation is performed by same calculation is performed by
@method[editor<%> dc-location-to-editor-location]. @method[editor<%> dc-location-to-editor-location].
@boxisfillnull[(scheme x) @elem{the translated x-coordinate of the value initially @boxisfillnull[@racket[x] @elem{the translated x-coordinate of the value initially
in @racket[x]}] in @racket[x]}]
@boxisfillnull[(scheme y) @elem{the translated x-coordinate of the value initially @boxisfillnull[@racket[y] @elem{the translated x-coordinate of the value initially
in @racket[y]}] in @racket[y]}]
@|OVD| @|OVD|
@ -1123,9 +1123,9 @@ Converts the given coordinates from editor @techlink{location}
canvas coordinates). The same calculation is performed by canvas coordinates). The same calculation is performed by
@method[editor<%> editor-location-to-dc-location]. @method[editor<%> editor-location-to-dc-location].
@boxisfillnull[(scheme x) @elem{the translated x-coordinate of the value initially @boxisfillnull[@racket[x] @elem{the translated x-coordinate of the value initially
in @racket[x]}] in @racket[x]}]
@boxisfillnull[(scheme y) @elem{the translated x-coordinate of the value initially @boxisfillnull[@racket[y] @elem{the translated x-coordinate of the value initially
in @racket[y]}] in @racket[y]}]
@|OVD| @|OVD|

View File

@ -129,10 +129,10 @@ If the editor is a text editor, then @racket[1] is normally subtracted
Gets the current border insets for the snip. The inset sets how much space Gets the current border insets for the snip. The inset sets how much space
is left between the edge of the snip and the border. is left between the edge of the snip and the border.
@boxisfill[(scheme l) @elem{left inset}] @boxisfill[@racket[l] @elem{left inset}]
@boxisfill[(scheme t) @elem{top inset}] @boxisfill[@racket[t] @elem{top inset}]
@boxisfill[(scheme r) @elem{right inset}] @boxisfill[@racket[r] @elem{right inset}]
@boxisfill[(scheme b) @elem{bottom inset}] @boxisfill[@racket[b] @elem{bottom inset}]
} }
@ -147,10 +147,10 @@ Gets the current margins for the snip. The margin sets how much space
is left between the edge of the editor's contents and the edge of the is left between the edge of the editor's contents and the edge of the
snip. snip.
@boxisfill[(scheme l) @elem{left margin}] @boxisfill[@racket[l] @elem{left margin}]
@boxisfill[(scheme t) @elem{top margin}] @boxisfill[@racket[t] @elem{top margin}]
@boxisfill[(scheme r) @elem{right margin}] @boxisfill[@racket[r] @elem{right margin}]
@boxisfill[(scheme b) @elem{bottom margin}] @boxisfill[@racket[b] @elem{bottom margin}]
} }
@ -271,7 +271,7 @@ Sets the current margins for the snip. The margin sets how much space
@defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))]) @defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{ void?]{
@edsnipmax[(scheme height)] @edsnipmax[@racket[height]]
Zero or @racket['none] disables the limit. Zero or @racket['none] disables the limit.
@ -280,7 +280,7 @@ Zero or @racket['none] disables the limit.
@defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))]) @defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{ void?]{
@edsnipmax[(scheme width)] The contained editor's width limits are not @edsnipmax[@racket[width]] The contained editor's width limits are not
changed by this method. changed by this method.
Zero or @racket['none] disables the limit. Zero or @racket['none] disables the limit.
@ -290,7 +290,7 @@ Zero or @racket['none] disables the limit.
@defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))]) @defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{ void?]{
@edsnipmin[(scheme height) @elem{top}] @edsnipmin[@racket[height] @elem{top}]
Zero or @racket['none] disables the limit. Zero or @racket['none] disables the limit.
@ -299,7 +299,7 @@ Zero or @racket['none] disables the limit.
@defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))]) @defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{ void?]{
@edsnipmin[(scheme width) @elem{left}] The contained editor's width @edsnipmin[@racket[width] @elem{left}] The contained editor's width
limits are not changed by this method. limits are not changed by this method.
Zero or @racket['none] disables the limit. Zero or @racket['none] disables the limit.

View File

@ -25,7 +25,7 @@ An in-stream base---possibly an @racket[editor-stream-in-bytes-base%]
Reads data from the stream, returning itself. Reads data from the stream, returning itself.
Reading from a bad stream always gives @racket[0]. Reading from a bad stream always gives @racket[0].
@boxisfill[(scheme v) @elem{the next integer or floating-point value in the stream}] @boxisfill[@racket[v] @elem{the next integer or floating-point value in the stream}]
} }
@ -40,7 +40,7 @@ Like @method[editor-stream-in% get-unterminated-bytes], but the last
@method[editor-stream-in% get-unterminated-bytes] when data is @method[editor-stream-in% get-unterminated-bytes] when data is
written with an explicit byte count. written with an explicit byte count.
@boxisfillnull[(scheme len) @elem{the length of the byte string plus one (to indicate the terminator)}] @boxisfillnull[@racket[len] @elem{the length of the byte string plus one (to indicate the terminator)}]
} }
@ -54,7 +54,7 @@ Returns the next integer value in the stream.
@defmethod[(get-fixed [v (box/c exact-integer?)]) @defmethod[(get-fixed [v (box/c exact-integer?)])
(is-a?/c editor-stream-in%)]{ (is-a?/c editor-stream-in%)]{
@boxisfill[(scheme v) @elem{a fixed-size integer from the stream obtained through @boxisfill[@racket[v] @elem{a fixed-size integer from the stream obtained through
@method[editor-stream-in% get-fixed-exact]}] @method[editor-stream-in% get-fixed-exact]}]
} }
@ -90,7 +90,7 @@ Note that when @method[editor-stream-out% put] is not given a byte
length, it includes an extra byte for a nul terminator; use length, it includes an extra byte for a nul terminator; use
@method[editor-stream-in% get-bytes] to read such byte strings. @method[editor-stream-in% get-bytes] to read such byte strings.
@boxisfillnull[(scheme len) @elem{the length of the byte string}] @boxisfillnull[@racket[len] @elem{the length of the byte string}]
} }

View File

@ -30,7 +30,7 @@ of the gauge.
If @racket[label] is a string, it is used as the gauge label; otherwise If @racket[label] is a string, it is used as the gauge label; otherwise
the gauge does not display a label. the gauge does not display a label.
@labelsimplestripped[(scheme label) @elem{gauge}] @labelsimplestripped[@racket[label] @elem{gauge}]
The @racket[range] argument is an integer specifying the maximum value of The @racket[range] argument is an integer specifying the maximum value of
the gauge (inclusive). The minimum gauge value is always @racket[0]. the gauge (inclusive). The minimum gauge value is always @racket[0].

View File

@ -68,7 +68,7 @@ Returns the name of the currently loaded, non-inlined file, or
@racket[#f] if a file is not loaded or if a file was loaded with @racket[#f] if a file is not loaded or if a file was loaded with
inlining (the default). inlining (the default).
@boxisfillnull[(scheme relative-path) @elem{@racket[#t] if the loaded file's path is @boxisfillnull[@racket[relative-path] @elem{@racket[#t] if the loaded file's path is
relative to the owning editor's path}] relative to the owning editor's path}]
} }

View File

@ -58,7 +58,8 @@ See also @racket[choice%].
If @racket[label] is not @racket[#f], it is used as the list box If @racket[label] is not @racket[#f], it is used as the list box
label. Otherwise, the list box will not display its label. label. Otherwise, the list box will not display its label.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the list box}] @labelstripped[@racket[label] @elem{}
@elem{move the keyboard focus to the list box}]
The @racket[choices] list specifies the initial list of items The @racket[choices] list specifies the initial list of items
to appear in the list box. If the list box has multiple columns, to appear in the list box. If the list box has multiple columns,

View File

@ -31,7 +31,7 @@ Creates a string or bitmap message initially showing @racket[label].
@racket['caution] is a caution-sign icon, and @racket['stop] is a @racket['caution] is a caution-sign icon, and @racket['stop] is a
stop-sign icon. stop-sign icon.
@labelsimplestripped[(scheme label) @elem{message}] @labelsimplestripped[@racket[label] @elem{message}]
@DeletedStyleNote[@racket[style] @racket[parent]]{message} @DeletedStyleNote[@racket[style] @racket[parent]]{message}

View File

@ -19,9 +19,9 @@ See also @method[style-delta% get-foreground-mult] and
Gets all of the scaling values. Gets all of the scaling values.
@boxisfill[(scheme r) @elem{the scaling value for the red component of the color}] @boxisfill[@racket[r] @elem{the scaling value for the red component of the color}]
@boxisfill[(scheme g) @elem{the scaling value for the green component of the color}] @boxisfill[@racket[g] @elem{the scaling value for the green component of the color}]
@boxisfill[(scheme b) @elem{the scaling value for the blue component of the color}] @boxisfill[@racket[b] @elem{the scaling value for the blue component of the color}]
} }

View File

@ -42,7 +42,8 @@ Creates a radio button set with string or bitmap labels. The
@racket[choices] list specifies the radio button labels; the list of @racket[choices] list specifies the radio button labels; the list of
choices must be homogeneous, either all strings or all bitmaps. choices must be homogeneous, either all strings or all bitmaps.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the radio box}] @labelstripped[@racket[label]
@elem{} @elem{move the keyboard focus to the radio box}]
Each string in @racket[choices] can also contain a @litchar{&}, which Each string in @racket[choices] can also contain a @litchar{&}, which
creates a mnemonic for clicking the corresponding radio button. As creates a mnemonic for clicking the corresponding radio button. As

View File

@ -37,7 +37,8 @@ Whenever the user changes the value of a slider, its callback
If @racket[label] is a string, it is used as the label for the slider. If @racket[label] is a string, it is used as the label for the slider.
Otherwise, the slider does not display its label. Otherwise, the slider does not display its label.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the slider}] @labelstripped[@racket[label]
@elem{} @elem{move the keyboard focus to the slider}]
The @racket[min-value] and @racket[max-value] arguments specify the The @racket[min-value] and @racket[max-value] arguments specify the
range of the slider, inclusive. The @racket[init-value] argument range of the slider, inclusive. The @racket[init-value] argument

View File

@ -374,11 +374,11 @@ Does nothing.
@methspec{ @methspec{
Returns the current tab-position array as a list. Returns the current tab-position array as a list.
@boxisfillnull[(scheme length) @elem{the length of the tab array (and therefore the returned @boxisfillnull[@racket[length] @elem{the length of the tab array (and therefore the returned
list)}] list)}]
@boxisfillnull[(scheme tab-width) @elem{the width used for tabs past the @boxisfillnull[@racket[tab-width] @elem{the width used for tabs past the
end of the tab array}] end of the tab array}]
@boxisfillnull[(scheme in-units) @elem{@racket[#t] if the tabs are specified in @boxisfillnull[@racket[in-units] @elem{@racket[#t] if the tabs are specified in
canvas units or @racket[#f] if they are specified in space-widths}] canvas units or @racket[#f] if they are specified in space-widths}]
} }

View File

@ -525,7 +525,7 @@ See also @method[text% delete].
Given a @techlink{location} in the editor, returns the line at the Given a @techlink{location} in the editor, returns the line at the
@techlink{location}. @|LineNumbering| @techlink{location}. @|LineNumbering|
@boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually @boxisfillnull[@racket[on-it?] @elem{@racket[#t] if the line actually
touches this @techlink{position}, or @racket[#f] otherwise}] (A large touches this @techlink{position}, or @racket[#f] otherwise}] (A large
enough @racket[y] will always return the last line number, but will enough @racket[y] will always return the last line number, but will
set @racket[on-it?] to @racket[#f].) set @racket[on-it?] to @racket[#f].)
@ -567,10 +567,10 @@ Given a @techlink{location} in the editor, returns the @techlink{position} at th
@techlink{location}. @techlink{location}.
See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument. See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument.
@boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually touches this @boxisfillnull[@racket[on-it?] @elem{@racket[#t] if the line actually touches this
@techlink{position}, or @racket[#f] otherwise}] @techlink{position}, or @racket[#f] otherwise}]
@boxisfillnull[(scheme edge-close?) @elem{it will be filled in with a value @boxisfillnull[@racket[edge-close?] @elem{it will be filled in with a value
indicating how close the point is to the vertical edges of the @techlink{item} indicating how close the point is to the vertical edges of the @techlink{item}
when the point falls on the @techlink{item}}] If the point is closest to the left when the point falls on the @techlink{item}}] If the point is closest to the left
edge of the @techlink{item}, the value will be negative; otherwise, the value edge of the @techlink{item}, the value will be negative; otherwise, the value
@ -594,7 +594,7 @@ Given a @techlink{location} within a line of the editor, returns the
@techlink{position} at the @techlink{location}. @|LineNumbering| @techlink{position} at the @techlink{location}. @|LineNumbering|
See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument. See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument.
@boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually @boxisfillnull[@racket[on-it?] @elem{@racket[#t] if the line actually
touches this @techlink{position}, or @racket[#f] otherwise}] touches this @techlink{position}, or @racket[#f] otherwise}]
See @method[text% find-position] for a discussion of See @method[text% find-position] for a discussion of
@ -632,7 +632,7 @@ can be any of the following:
] ]
@boxisfillnull[(scheme s-pos) @elem{the @techlink{position} where the returned snip starts}] @boxisfillnull[@racket[s-pos] @elem{the @techlink{position} where the returned snip starts}]
} }
@ -864,8 +864,8 @@ the same number and that number will be where the insertion point is.
See also @method[text% get-start-position] See also @method[text% get-start-position]
and @method[text% get-end-position]. and @method[text% get-end-position].
@boxisfillnull[(scheme start) @elem{the starting @techlink{position} of the selection}] @boxisfillnull[@racket[start] @elem{the starting @techlink{position} of the selection}]
@boxisfillnull[(scheme end) @elem{the ending @techlink{position} of the selection}] @boxisfillnull[@racket[end] @elem{the ending @techlink{position} of the selection}]
} }
@ -921,9 +921,9 @@ Gets a snip's @techlink{position} and top left @techlink{location} in editor
coordinates. The return value is @racket[#t] if the snip is found, coordinates. The return value is @racket[#t] if the snip is found,
@racket[#f] otherwise. @racket[#f] otherwise.
@boxisfillnull[(scheme pos) @elem{starting @techlink{position} of @racket[snip]}] @boxisfillnull[@racket[pos] @elem{starting @techlink{position} of @racket[snip]}]
@boxisfillnull[(scheme x) @elem{left @techlink{location} of @racket[snip] in editor coordinates}] @boxisfillnull[@racket[x] @elem{left @techlink{location} of @racket[snip] in editor coordinates}]
@boxisfillnull[(scheme y) @elem{top @techlink{location} of @racket[snip] in editor coordinates}] @boxisfillnull[@racket[y] @elem{top @techlink{location} of @racket[snip] in editor coordinates}]
When @techlink{location} information is requested: @|OVD| @|FCA| When @techlink{location} information is requested: @|OVD| @|FCA|
@ -968,11 +968,11 @@ See also @method[text% set-styles-sticky].
Returns the current tab-position array as a list. Returns the current tab-position array as a list.
@boxisfillnull[(scheme length) @elem{the length of the tab array (and therefore the returned @boxisfillnull[@racket[length] @elem{the length of the tab array (and therefore the returned
list)}] list)}]
@boxisfillnull[(scheme tab-width) @elem{the width used for tabs past the @boxisfillnull[@racket[tab-width] @elem{the width used for tabs past the
end of the tab array}] end of the tab array}]
@boxisfillnull[(scheme in-units) @elem{@racket[#t] if the tabs are specified in @boxisfillnull[@racket[in-units] @elem{@racket[#t] if the tabs are specified in
canvas units or @racket[#f] if they are specified in space-widths}] canvas units or @racket[#f] if they are specified in space-widths}]
See also See also
@ -1024,8 +1024,8 @@ The reported baseline distance includes the editor's
Returns the range of lines which are currently visible (or partially Returns the range of lines which are currently visible (or partially
visible) to the user. @|LineNumbering| visible) to the user. @|LineNumbering|
@boxisfillnull[(scheme start) @elem{first line visible to the user}] @boxisfillnull[@racket[start] @elem{first line visible to the user}]
@boxisfillnull[(scheme end) @elem{last line visible to the user}] @boxisfillnull[@racket[end] @elem{last line visible to the user}]
If the editor is displayed by multiple canvases and @racket[all?] is If the editor is displayed by multiple canvases and @racket[all?] is
@racket[#t], then the computed range includes all visible lines in all @racket[#t], then the computed range includes all visible lines in all
@ -1045,8 +1045,8 @@ If the editor is displayed by multiple canvases and @racket[all?] is
Returns the range of @techlink{position}s that are currently visible (or Returns the range of @techlink{position}s that are currently visible (or
partially visible) to the user. partially visible) to the user.
@boxisfillnull[(scheme start) @elem{first @techlink{position} visible to the user}] @boxisfillnull[@racket[start] @elem{first @techlink{position} visible to the user}]
@boxisfillnull[(scheme end) @elem{last @techlink{position} visible to the user}] @boxisfillnull[@racket[end] @elem{last @techlink{position} visible to the user}]
If the editor is displayed by multiple canvases and @racket[all?] is If the editor is displayed by multiple canvases and @racket[all?] is
@racket[#t], then the computed range includes all visible @techlink{position}s in @racket[#t], then the computed range includes all visible @techlink{position}s in
@ -1179,7 +1179,7 @@ Returns the number of the last line in the editor. Lines are numbered
starting with @racket[0], so this is one less than the number of lines starting with @racket[0], so this is one less than the number of lines
in the editor. in the editor.
@LineToPara[(scheme last-paragraph)] @LineToPara[@racket[last-paragraph]]
@|FCAMW| @|EVD| @|FCAMW| @|EVD|
} }
@ -1219,7 +1219,7 @@ If the line ends with invisible @techlink{item}s (such as a carriage
@techlink{position} before the invisible @techlink{item}s is @techlink{position} before the invisible @techlink{item}s is
returned. returned.
@LineToPara[(scheme paragraph-end-position)] @LineToPara[@racket[paragraph-end-position]]
@|FCAMW| @|EVD| @|FCAMW| @|EVD|
@ -1247,7 +1247,7 @@ If @racket[top?] is not @racket[#f], the @techlink{location} for the
top of the line is returned; otherwise, the @techlink{location} for top of the line is returned; otherwise, the @techlink{location} for
the bottom of the line is returned. the bottom of the line is returned.
@LineToPara[(scheme paragraph-location)] @LineToPara[@racket[paragraph-location]]
@|OVD| @|FCA| @|OVD| @|FCA|
@ -1277,7 +1277,7 @@ If the line starts with invisible @techlink{item}s and @racket[visible?] is not
@racket[#f], the first @techlink{position} past the invisible @techlink{item}s is @racket[#f], the first @techlink{position} past the invisible @techlink{item}s is
returned. returned.
@LineToPara[(scheme paragraph-start-position)] @LineToPara[@racket[paragraph-start-position]]
@|FCAMW| @|FCAMW|
@ -1672,7 +1672,7 @@ See @|timediscuss| for a discussion of the @racket[time] argument. If
Returns the line number of the line containing a given @techlink{position}. @|LineNumbering| Returns the line number of the line containing a given @techlink{position}. @|LineNumbering|
@LineToPara[(scheme position-paragraph)] @LineToPara[@racket[position-paragraph]]
See @|ateoldiscuss| for a discussion of @racket[at-eol?]. See @|ateoldiscuss| for a discussion of @racket[at-eol?].
@ -1691,9 +1691,9 @@ See @|ateoldiscuss| for a discussion of @racket[at-eol?].
Returns the @techlink{location} of a given @techlink{position}. See also @method[text% position-locations]. Returns the @techlink{location} of a given @techlink{position}. See also @method[text% position-locations].
@boxisfillnull[(scheme x) @elem{the x-@techlink{location} of the @techlink{position} @racket[start] in editor @boxisfillnull[@racket[x] @elem{the x-@techlink{location} of the @techlink{position} @racket[start] in editor
coordinates} ] coordinates} ]
@boxisfillnull[(scheme y) @elem{the y-@techlink{location} (top or bottom; see below) of the @boxisfillnull[@racket[y] @elem{the y-@techlink{location} (top or bottom; see below) of the
@techlink{position} @racket[start] in editor coordinates}] @techlink{position} @racket[start] in editor coordinates}]
See @|ateoldiscuss| for a discussion of @racket[at-eol?]. See @|ateoldiscuss| for a discussion of @racket[at-eol?].

View File

@ -59,7 +59,7 @@ The keymap for the text field's editor is initialized by calling the
If @racket[label] is not @racket[#f], it is used as the text field If @racket[label] is not @racket[#f], it is used as the text field
label. Otherwise, the text field does not display its label. label. Otherwise, the text field does not display its label.
@labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the text field}] @labelstripped[@racket[label] @elem{} @elem{move the keyboard focus to the text field}]
The @racket[callback] procedure is called when the user changes the The @racket[callback] procedure is called when the user changes the
text in the text field or presses the Enter key (and Enter is not text in the text field or presses the Enter key (and Enter is not

View File

@ -5,33 +5,33 @@
@(define-syntax-rule (bdl intm-define intm-lambda) @(define-syntax-rule (bdl intm-define intm-lambda)
(begin (begin
(require (for-label lang/htdp-intermediate-lambda)) (require (for-label lang/htdp-intermediate-lambda))
(define intm-define (scheme define)) (define intm-define @racket[define])
(define intm-lambda (scheme lambda)))) (define intm-lambda @racket[lambda])))
@(bdl intm-define intm-lambda) @(bdl intm-define intm-lambda)
@(define-syntax-rule (bd intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time) @(define-syntax-rule (bd intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time)
(begin (begin
(require (for-label lang/htdp-intermediate)) (require (for-label lang/htdp-intermediate))
(define intm-define (scheme define)) (define intm-define @racket[define])
(define intm-define-struct (scheme define-struct)) (define intm-define-struct @racket[define-struct])
(define intm-local (scheme local)) (define intm-local @racket[local])
(define intm-letrec (scheme letrec)) (define intm-letrec @racket[letrec])
(define intm-let (scheme let)) (define intm-let @racket[let])
(define intm-let* (scheme let*)) (define intm-let* @racket[let*])
(define intm-time (scheme time)))) (define intm-time @racket[time])))
@(bd intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time) @(bd intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time)
@(define-syntax-rule (bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(define-syntax-rule (bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)
(begin (begin
(require (for-label lang/htdp-beginner)) (require (for-label lang/htdp-beginner))
(define beg-define (scheme define)) (define beg-define @racket[define])
(define beg-define-struct (scheme define-struct)) (define beg-define-struct @racket[define-struct])
(define beg-cond (scheme cond)) (define beg-cond @racket[cond])
(define beg-if (scheme if)) (define beg-if @racket[if])
(define beg-and (scheme and)) (define beg-and @racket[and])
(define beg-or (scheme or)) (define beg-or @racket[or])
(define beg-check-expect (scheme check-expect)) (define beg-check-expect @racket[check-expect])
(define beg-require (scheme require)))) (define beg-require @racket[require])))
@(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)

View File

@ -5,14 +5,14 @@
@(define-syntax-rule (bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(define-syntax-rule (bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)
(begin (begin
(require (for-label lang/htdp-beginner)) (require (for-label lang/htdp-beginner))
(define beg-define (scheme define)) (define beg-define @racket[define])
(define beg-define-struct (scheme define-struct)) (define beg-define-struct @racket[define-struct])
(define beg-cond (scheme cond)) (define beg-cond @racket[cond])
(define beg-if (scheme if)) (define beg-if @racket[if])
(define beg-and (scheme and)) (define beg-and @racket[and])
(define beg-or (scheme or)) (define beg-or @racket[or])
(define beg-check-expect (scheme check-expect)) (define beg-check-expect @racket[check-expect])
(define beg-require (scheme require)))) (define beg-require @racket[require])))
@(bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)

View File

@ -5,26 +5,26 @@
@(define-syntax-rule (bd intm-define intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time) @(define-syntax-rule (bd intm-define intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time)
(begin (begin
(require (for-label lang/htdp-intermediate)) (require (for-label lang/htdp-intermediate))
(define intm-define (scheme define)) (define intm-define @racket[define])
(define intm-define-struct (scheme define-struct)) (define intm-define-struct @racket[define-struct])
(define intm-local (scheme local)) (define intm-local @racket[local])
(define intm-letrec (scheme letrec)) (define intm-letrec @racket[letrec])
(define intm-let (scheme let)) (define intm-let @racket[let])
(define intm-let* (scheme let*)) (define intm-let* @racket[let*])
(define intm-time (scheme time)))) (define intm-time @racket[time])))
@(bd intm-define intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time) @(bd intm-define intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time)
@(define-syntax-rule (bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(define-syntax-rule (bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)
(begin (begin
(require (for-label lang/htdp-beginner)) (require (for-label lang/htdp-beginner))
(define beg-define (scheme define)) (define beg-define @racket[define])
(define beg-define-struct (scheme define-struct)) (define beg-define-struct @racket[define-struct])
(define beg-cond (scheme cond)) (define beg-cond @racket[cond])
(define beg-if (scheme if)) (define beg-if @racket[if])
(define beg-and (scheme and)) (define beg-and @racket[and])
(define beg-or (scheme or)) (define beg-or @racket[or])
(define beg-check-expect (scheme check-expect)) (define beg-check-expect @racket[check-expect])
(define beg-require (scheme require)))) (define beg-require @racket[require])))
@(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) @(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require)

View File

@ -60,7 +60,7 @@
(make-flow (make-flow
(list (list
(make-paragraph (make-paragraph
(list "A " (scheme _prim-op) " is one of:"))))) (list "A " (racket _prim-op) " is one of:")))))
(apply (apply
append append
(map (lambda (category) (map (lambda (category)

View File

@ -15,8 +15,8 @@
(syntax-case stx (*) (syntax-case stx (*)
[(_ [* (form ...) (also ...)]) [(_ [* (form ...) (also ...)])
#'(defform* (form ...) #'(defform* (form ...)
"See " (scheme class*) (sees also ...) "; use" "See " @racket[class*] (sees also ...) "; use"
" outside the body of a " (scheme class*) " form is a syntax error.")] " outside the body of a " @racket[class*] " form is a syntax error.")]
[(_ [form (also ...)]) [(_ [form (also ...)])
#'(defclassforms [* (form) (also ...)])] #'(defclassforms [* (form) (also ...)])]
[(_ form ...) [(_ form ...)
@ -38,7 +38,7 @@
s))]) s))])
#'(... #'(...
(defform tmpl (defform tmpl
"Shorthand for " (scheme (begin (#,(scheme name) id) ... (define id _expr) ...)) ".")))] "Shorthand for " (racket (begin (#,(racket name) id) ... (define id _expr) ...)) ".")))]
[(_ form ...) [(_ form ...)
#'(begin (defstarshorthands form) ...)])) #'(begin (defstarshorthands form) ...)]))
@ -57,11 +57,11 @@
(cdr (syntax-e s))) (cdr (syntax-e s)))
s))]) s))])
#'(... #'(...
(defform* [tmpl1 (#,(scheme name) (id . formals) body ...+)] (defform* [tmpl1 (#,(racket name) (id . formals) body ...+)]
"Shorthand for " "Shorthand for "
(scheme (begin (#,(scheme form) id) (define id expr))) (racket (begin (#,(racket form) id) (define id expr)))
" or " " or "
(scheme (begin (#,(scheme form) id) (define (id . formals) body ...+)))))))] (racket (begin (#,(racket form) id) (define (id . formals) body ...+)))))))]
[(_ form ...) [(_ form ...)
#'(begin (defdefshorthands form) ...)])) #'(begin (defdefshorthands form) ...)]))

View File

@ -12,4 +12,4 @@
(defidform (... ...) . body)])) (defidform (... ...) . body)]))
(define ellipses-id (define ellipses-id
(scheme ...))) (racket ...)))

View File

@ -22,7 +22,7 @@
[(regexp-match-positions #rx"pattern" s) [(regexp-match-positions #rx"pattern" s)
=> (fixup s "pattern")] => (fixup s "pattern")]
[(regexp-match-positions #rx"equal%" s) [(regexp-match-positions #rx"equal%" s)
=> (fixup s (scheme equal?))] => (fixup s (racket equal?))]
[(regexp-match-positions #rx"pat" s) [(regexp-match-positions #rx"pat" s)
=> (fixup s (fixup-sexp 'pat))] => (fixup s (fixup-sexp 'pat))]
[(regexp-match-positions #rx"qp" s) [(regexp-match-positions #rx"qp" s)

View File

@ -83,10 +83,10 @@
(make-element #f (list s " exception is raised"))) (make-element #f (list s " exception is raised")))
(define-syntax exnraise (define-syntax exnraise
(syntax-rules () (syntax-rules ()
[(_ s) (*exnraise (scheme s))])) [(_ s) (*exnraise (racket s))]))
(define-syntax Exn (define-syntax Exn
(syntax-rules () (syntax-rules ()
[(_ s) (scheme s)])) [(_ s) (racket s)]))
(provide exnraise Exn) (provide exnraise Exn)
(provide margin-note/ref (provide margin-note/ref
@ -132,6 +132,6 @@
(define-syntax speed (define-syntax speed
(syntax-rules () (syntax-rules ()
[(_ id what) [(_ id what)
(t "An " (scheme id) " application can provide better performance for " (t "An " (racket id) " application can provide better performance for "
(elem what) (elem what)
" iteration when it appears directly in a " (scheme for) " clause.")]))) " iteration when it appears directly in a " (racket for) " clause.")])))

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.rkt") @(require "mz.rkt")
@(define lit-ellipsis (scheme ...)) @(define lit-ellipsis (racket ...))
@(define syntax-eval @(define syntax-eval
(lambda () (lambda ()

View File

@ -344,7 +344,7 @@ in a form definition.}
@defform[(schemeresult datum ...)] @defform[(schemeresult datum ...)]
@defform[(schemeid datum ...)] @defform[(schemeid datum ...)]
@defform*[((schememodname datum) @defform*[((schememodname datum)
(schememodname ((unsyntax (scheme unsyntax)) expr)))] (schememodname ((unsyntax (racket unsyntax)) expr)))]
@defform[(schememodlink datum pre-content-expr ...)] @defform[(schememodlink datum pre-content-expr ...)]
@defproc[(schemefont [pre-content pre-content?] ...) element?] @defproc[(schemefont [pre-content pre-content?] ...) element?]
@defproc[(schemevalfont [pre-content pre-content?] ...) element?] @defproc[(schemevalfont [pre-content pre-content?] ...) element?]

View File

@ -630,7 +630,7 @@ library; they are here for backwards compatibility and to provide links to the
[(drr-id ...) drr-vars]) [(drr-id ...) drr-vars])
#'(begin #'(begin
(defthing drs-id any/c (defthing drs-id any/c
"This is provided for backwards compatibility; new code should use " (scheme drr-id) " instead.") "This is provided for backwards compatibility; new code should use " (racket drr-id) " instead.")
...)))) ...))))
@drs-compat[] @drs-compat[]

View File

@ -46,7 +46,7 @@
(define-syntax-rule (def-mz mz-if) (define-syntax-rule (def-mz mz-if)
(begin (begin
(require (for-label mzscheme)) (require (for-label mzscheme))
(define mz-if (scheme if)))) (define mz-if (racket if))))
(def-mz mz-if)) (def-mz mz-if))
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
@(define-syntax-rule (intro id) @(define-syntax-rule (intro id)
(begin (begin
(require (for-label mzscheme)) (require (for-label mzscheme))
(define id (scheme if)))) (define id (racket if))))
@(intro mzscheme-if) @(intro mzscheme-if)
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------

View File

@ -8,7 +8,7 @@
myexamples myexamples
myinteraction) myinteraction)
(define ellipses (scheme ...)) (define ellipses (racket ...))
(define (fixup exn) (define (fixup exn)
(let ([src (ormap values (exn:fail:syntax-exprs exn))]) (let ([src (ormap values (exn:fail:syntax-exprs exn))])
@ -86,7 +86,7 @@
(syntax-rules () (syntax-rules ()
[(def id suffix ...) [(def id suffix ...)
(elemtag (list 'pattern-link (list 'id 'suffix ...)) (elemtag (list 'pattern-link (list 'id 'suffix ...))
(scheme id) (racket id)
#|(superscript (symbol->string 'suffix)) ...|# )])) #|(superscript (symbol->string 'suffix)) ...|# )]))
(provide defhere (provide defhere

View File

@ -7,7 +7,7 @@
@(define-syntax-rule (define-dotsplus-names dotsplus def-dotsplus) @(define-syntax-rule (define-dotsplus-names dotsplus def-dotsplus)
(begin (require (for-label (only-in syntax/parse ...+))) (begin (require (for-label (only-in syntax/parse ...+)))
(define dotsplus (scheme ...+)) (define dotsplus (racket ...+))
(define def-dotsplus (defhere ...+)))) (define def-dotsplus (defhere ...+))))
@(define-dotsplus-names dotsplus def-dotsplus) @(define-dotsplus-names dotsplus def-dotsplus)

View File

@ -13,6 +13,5 @@
(define-syntax-rule (def-req beg-require) (define-syntax-rule (def-req beg-require)
(begin (begin
(require (for-label lang/htdp-beginner)) (require (for-label lang/htdp-beginner))
(define beg-require (scheme require)))) (define beg-require (racket require))))
(def-req beginner-require) (def-req beginner-require)

View File

@ -7,9 +7,9 @@
@(define-syntax speed @(define-syntax speed
(syntax-rules () (syntax-rules ()
[(_ id what) [(_ id what)
(t "An " (scheme id) " application can provide better performance for " (t "An " (racket id) " application can provide better performance for "
(elem what) (elem what)
" iteration when it appears directly in a " (scheme for) " iteration when it appears directly in a " (racket for)
" clause.")])) " clause.")]))
@title[#:tag "sequence"]{Sequences} @title[#:tag "sequence"]{Sequences}