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
(lambda (a)
(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.
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.
Der letzte Zweig kann auch ein @racket[else]-Zweig sein, falls
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.
Bei Fallunterscheidungen mit zwei Kategorien kann auch @racket[if]
@ -68,40 +68,40 @@ anfängt:
@racketblock[
(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{- @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
(``Schokokeks''), die @elem[(scheme Feld) (subscript "i")] sind
(``Schokokeks''), die @elem[@racket[Feld] @subscript{i}] sind
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
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:
@racketblock[
(define-record-procedures sig
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
Form:
@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:
@racketblock[
(: 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}
@ -126,15 +126,15 @@ eine Datendefinition der Form:
@racketblock[
(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{- @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]})
]
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
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
Signatur.
@ -143,13 +143,13 @@ Aus der Datendefinition entsteht eine Signaturdefinition folgender Form:
@racketblock[
(define sig
(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?)
(subscript "1")] ... @elem[(scheme pred?) (subscript "n")] heißen, hat die
Wenn die Prädikate für die einzelnen Sorten @elem[@racket[pred?]
@subscript{1}] ... @elem[@racket[pred?] @subscript{n}] heißen, hat die
Schablone für eine Prozedur, die gemischte Daten konsumiert, die
folgende Form:
@ -159,9 +159,9 @@ folgende Form:
(define proc
(lambda (a)
(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
@ -342,14 +342,15 @@ veränderbares Feld steht:
@racketblock[
(define-record-procedures-2 sig
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
Record-Arguments @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,
sieht der Aufruf folgendermaßen aus: @racket[(#,(elem (scheme mutate) (subscript "k")) r a)].
In der Schablone für Prozeduren, die den Zustand eines Record-Arguments
@racket[r] ändern, benutzen Sie den dazugehörigen Mutator
@elem[@racket[mutate] @subscript{k}] Wenn @racket[a] der Ausdruck für
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
sinnvollen Rückgabewert nach einer Mutation zu liefern, benutzen Sie
@racket[begin].

View File

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

View File

@ -9,11 +9,11 @@
@(define-syntax-rule (def-mz id)
(begin
(require (for-label mzscheme))
(define id (scheme provide))))
(define id (racket provide))))
@(def-mz mzscheme-provide)
@(define-syntax-rule (reprovide id ...)
(*threecolumns (list (scheme id) ... 'nbsp 'nbsp)))
(*threecolumns (list (racket id) ... 'nbsp 'nbsp)))
@(define (*threecolumns l)
(let* ([len (length l)]
[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
and using exact numbers.
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.
@chunk[<cell-center-y>

View File

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

View File

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

View File

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

View File

@ -16,8 +16,8 @@
(define-syntax-rule (bind id else-id)
(begin
(require (for-label scheme/base))
(define id (scheme lambda))
(define else-id (scheme else))))
(define id (racket lambda))
(define else-id (racket else))))
(bind base-lambda base-else))
@mzlib[#:mode title etc]
@ -262,7 +262,7 @@ no filename is available, the result is @racket[#f].}
@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
@racket[make-hash-table], and then mapping each key to the

View File

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

View File

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

View File

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

View File

@ -25,15 +25,15 @@
(list (to-flow spacer)
(to-flow sec)
(to-flow spacer)
(to-flow (scheme sym0))
(to-flow (racket sym0))
(to-flow spacer)
(to-flow (scheme flag0)))
(to-flow (racket flag0)))
(list (to-flow spacer)
(to-flow spacer)
(to-flow spacer)
(to-flow (scheme sym))
(to-flow (racket sym))
(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
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
@racket[symbol->imap-flag] procedures convert IMAP flags to convenient
symbols and vice-versa:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -71,11 +71,11 @@
[(->d (req ...) () (values [name res] ...))
#'((id req ...) (values 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])
#'((id req ...) 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])
#'((id req ... [rest rest-ctc] (... ...)) res ())]
[(->d (req ...) (one more ...) whatever)
@ -99,7 +99,7 @@
[(->i (req ...) () #:pre (pre-id ...) condition (values ress ...))
(with-syntax ([(req ...) (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)
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[name res] (remove->i-deps #'res)])
@ -107,7 +107,7 @@
[(->i (req ...) () #:pre (pre-id ...) condition [name res])
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[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)
(with-syntax ([(req ...) (map remove->i-deps (syntax->list #'(req ...)))]
[[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?)))])
void?]{
Gets the scaling factor for PostScript output. @boxisfill[(scheme x)
@elem{the horizontal scaling factor}] @boxisfill[(scheme y) @elem{the
Gets the scaling factor for PostScript output. @boxisfill[@racket[x]
@elem{the horizontal scaling factor}] @boxisfill[@racket[y] @elem{the
vertical scaling factor}] The default is @racket[0.8] by
@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
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
provided, it is supplied directly as the last argument to
@racket[get-ffi-obj]. The @racket[make-not-available] function

View File

@ -18,7 +18,7 @@ for @racket[make-bytes].
(syntax-case stx ()
[(_ id elem)
#'(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)
(syntax-case stx ()
[(_ id elem extra desc ...)
@ -57,7 +57,8 @@ for @racket[make-bytes].
desc ...
(extra
(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
;; for pieces in the _vec definition:
(defform* [#,(datum->syntax
@ -90,7 +91,8 @@ for @racket[make-bytes].
(sub1 (syntax-position #'vec))
10))
_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))]{

View File

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

View File

@ -1,4 +1,4 @@
#readerscribble/reader
#reader scribble/reader
(module blurbs scheme/base
(require scribble/struct
scribble/manual
@ -47,14 +47,14 @@
(define-syntax bitmaplabeluse
(syntax-rules ()
[(_ id) @bitmapuseinfo["If" (scheme id) "a bitmap" " and" "the"]]))
[(_ id) @bitmapuseinfo["If" @racket[id] "a bitmap" " and" "the"]]))
(define-syntax bitmaplabelusearray
(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
(syntax-rules ()
[(_ id) @bitmapuseinfo["Since" (scheme id) "a bitmap" "" "the"]]))
[(_ id) @bitmapuseinfo["Since" @racket[id] "a bitmap" "" "the"]]))
(define bitmapiforiglabel
@elem{The bitmap label is installed only
if the control was originally created with a bitmap label.})

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]
@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
@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
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
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.
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
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
while it receives a mouse or keyboard event.
@boxisfillnull[(scheme 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[x] @elem{the x-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
@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
screen.
@boxisfillnull[(scheme 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[(scheme 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[x] @elem{the left edge of the visible region in editor coordinates}]
@boxisfillnull[@racket[y] @elem{the top edge of the visible region in editor coordinates}]
@boxisfillnull[@racket[w] @elem{the width 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
@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?]{
Gets the current extent of the editor's graphical representation.
@boxisfillnull[(scheme w) @elem{the editor's width}]
@boxisfillnull[(scheme h) @elem{the editor's height}]
@boxisfillnull[@racket[w] @elem{the editor's width}]
@boxisfillnull[@racket[h] @elem{the editor's height}]
For a text editor, the reported extent includes the editor's
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
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}]
}
@ -799,8 +799,8 @@ Returns @racket[#f].
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.
@boxisfillnull[(scheme 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[x] @elem{the x-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
@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
@method[editor-admin% get-view] .
@boxisfillnull[(scheme w) @elem{the visible area width}]
@boxisfillnull[(scheme h) @elem{the visible area height}]
@boxisfillnull[@racket[w] @elem{the visible area width}]
@boxisfillnull[@racket[h] @elem{the visible area height}]
@|OVD|
@ -865,9 +865,9 @@ Converts the given coordinates from top-level @techlink{display} coordinates
same calculation is performed by
@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]}]
@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]}]
@|OVD|
@ -1123,9 +1123,9 @@ Converts the given coordinates from editor @techlink{location}
canvas coordinates). The same calculation is performed by
@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]}]
@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]}]
@|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
is left between the edge of the snip and the border.
@boxisfill[(scheme l) @elem{left inset}]
@boxisfill[(scheme t) @elem{top inset}]
@boxisfill[(scheme r) @elem{right inset}]
@boxisfill[(scheme b) @elem{bottom inset}]
@boxisfill[@racket[l] @elem{left inset}]
@boxisfill[@racket[t] @elem{top inset}]
@boxisfill[@racket[r] @elem{right 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
snip.
@boxisfill[(scheme l) @elem{left margin}]
@boxisfill[(scheme t) @elem{top margin}]
@boxisfill[(scheme r) @elem{right margin}]
@boxisfill[(scheme b) @elem{bottom margin}]
@boxisfill[@racket[l] @elem{left margin}]
@boxisfill[@racket[t] @elem{top margin}]
@boxisfill[@racket[r] @elem{right 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))])
void?]{
@edsnipmax[(scheme height)]
@edsnipmax[@racket[height]]
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))])
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.
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))])
void?]{
@edsnipmin[(scheme height) @elem{top}]
@edsnipmin[@racket[height] @elem{top}]
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))])
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.
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.
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
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?)])
(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]}]
}
@ -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
@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
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 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
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}]
}

View File

@ -58,7 +58,8 @@ See also @racket[choice%].
If @racket[label] is not @racket[#f], it is used as the list box
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
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
stop-sign icon.
@labelsimplestripped[(scheme label) @elem{message}]
@labelsimplestripped[@racket[label] @elem{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.
@boxisfill[(scheme 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[(scheme b) @elem{the scaling value for the blue component of the color}]
@boxisfill[@racket[r] @elem{the scaling value for the red component of the color}]
@boxisfill[@racket[g] @elem{the scaling value for the green 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
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
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.
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
range of the slider, inclusive. The @racket[init-value] argument

View File

@ -374,11 +374,11 @@ Does nothing.
@methspec{
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)}]
@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}]
@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}]
}

View File

@ -525,7 +525,7 @@ See also @method[text% delete].
Given a @techlink{location} in the editor, returns the line at the
@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
enough @racket[y] will always return the last line number, but will
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}.
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}]
@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}
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
@ -594,7 +594,7 @@ Given a @techlink{location} within a line of the editor, returns the
@techlink{position} at the @techlink{location}. @|LineNumbering|
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}]
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]
and @method[text% get-end-position].
@boxisfillnull[(scheme start) @elem{the starting @techlink{position} of the selection}]
@boxisfillnull[(scheme end) @elem{the ending @techlink{position} of the selection}]
@boxisfillnull[@racket[start] @elem{the starting @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,
@racket[#f] otherwise.
@boxisfillnull[(scheme pos) @elem{starting @techlink{position} of @racket[snip]}]
@boxisfillnull[(scheme 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[pos] @elem{starting @techlink{position} of @racket[snip]}]
@boxisfillnull[@racket[x] @elem{left @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|
@ -968,11 +968,11 @@ See also @method[text% set-styles-sticky].
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)}]
@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}]
@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}]
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
visible) to the user. @|LineNumbering|
@boxisfillnull[(scheme start) @elem{first line visible to the user}]
@boxisfillnull[(scheme end) @elem{last line visible to the user}]
@boxisfillnull[@racket[start] @elem{first 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
@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
partially visible) to the user.
@boxisfillnull[(scheme start) @elem{first @techlink{position} visible to the user}]
@boxisfillnull[(scheme end) @elem{last @techlink{position} visible to the user}]
@boxisfillnull[@racket[start] @elem{first @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
@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
in the editor.
@LineToPara[(scheme last-paragraph)]
@LineToPara[@racket[last-paragraph]]
@|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
returned.
@LineToPara[(scheme paragraph-end-position)]
@LineToPara[@racket[paragraph-end-position]]
@|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
the bottom of the line is returned.
@LineToPara[(scheme paragraph-location)]
@LineToPara[@racket[paragraph-location]]
@|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
returned.
@LineToPara[(scheme paragraph-start-position)]
@LineToPara[@racket[paragraph-start-position]]
@|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|
@LineToPara[(scheme position-paragraph)]
@LineToPara[@racket[position-paragraph]]
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].
@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} ]
@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}]
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
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
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)
(begin
(require (for-label lang/htdp-intermediate-lambda))
(define intm-define (scheme define))
(define intm-lambda (scheme lambda))))
(define intm-define @racket[define])
(define intm-lambda @racket[lambda])))
@(bdl intm-define intm-lambda)
@(define-syntax-rule (bd intm-define-struct intm-local intm-letrec intm-let intm-let* intm-time)
(begin
(require (for-label lang/htdp-intermediate))
(define intm-define (scheme define))
(define intm-define-struct (scheme define-struct))
(define intm-local (scheme local))
(define intm-letrec (scheme letrec))
(define intm-let (scheme let))
(define intm-let* (scheme let*))
(define intm-time (scheme time))))
(define intm-define @racket[define])
(define intm-define-struct @racket[define-struct])
(define intm-local @racket[local])
(define intm-letrec @racket[letrec])
(define intm-let @racket[let])
(define intm-let* @racket[let*])
(define intm-time @racket[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)
(begin
(require (for-label lang/htdp-beginner))
(define beg-define (scheme define))
(define beg-define-struct (scheme define-struct))
(define beg-cond (scheme cond))
(define beg-if (scheme if))
(define beg-and (scheme and))
(define beg-or (scheme or))
(define beg-check-expect (scheme check-expect))
(define beg-require (scheme require))))
(define beg-define @racket[define])
(define beg-define-struct @racket[define-struct])
(define beg-cond @racket[cond])
(define beg-if @racket[if])
(define beg-and @racket[and])
(define beg-or @racket[or])
(define beg-check-expect @racket[check-expect])
(define beg-require @racket[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)
(begin
(require (for-label lang/htdp-beginner))
(define beg-define (scheme define))
(define beg-define-struct (scheme define-struct))
(define beg-cond (scheme cond))
(define beg-if (scheme if))
(define beg-and (scheme and))
(define beg-or (scheme or))
(define beg-check-expect (scheme check-expect))
(define beg-require (scheme require))))
(define beg-define @racket[define])
(define beg-define-struct @racket[define-struct])
(define beg-cond @racket[cond])
(define beg-if @racket[if])
(define beg-and @racket[and])
(define beg-or @racket[or])
(define beg-check-expect @racket[check-expect])
(define beg-require @racket[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)
(begin
(require (for-label lang/htdp-intermediate))
(define intm-define (scheme define))
(define intm-define-struct (scheme define-struct))
(define intm-local (scheme local))
(define intm-letrec (scheme letrec))
(define intm-let (scheme let))
(define intm-let* (scheme let*))
(define intm-time (scheme time))))
(define intm-define @racket[define])
(define intm-define-struct @racket[define-struct])
(define intm-local @racket[local])
(define intm-letrec @racket[letrec])
(define intm-let @racket[let])
(define intm-let* @racket[let*])
(define intm-time @racket[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)
(begin
(require (for-label lang/htdp-beginner))
(define beg-define (scheme define))
(define beg-define-struct (scheme define-struct))
(define beg-cond (scheme cond))
(define beg-if (scheme if))
(define beg-and (scheme and))
(define beg-or (scheme or))
(define beg-check-expect (scheme check-expect))
(define beg-require (scheme require))))
(define beg-define @racket[define])
(define beg-define-struct @racket[define-struct])
(define beg-cond @racket[cond])
(define beg-if @racket[if])
(define beg-and @racket[and])
(define beg-or @racket[or])
(define beg-check-expect @racket[check-expect])
(define beg-require @racket[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
(list
(make-paragraph
(list "A " (scheme _prim-op) " is one of:")))))
(list "A " (racket _prim-op) " is one of:")))))
(apply
append
(map (lambda (category)

View File

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

View File

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

View File

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

View File

@ -83,10 +83,10 @@
(make-element #f (list s " exception is raised")))
(define-syntax exnraise
(syntax-rules ()
[(_ s) (*exnraise (scheme s))]))
[(_ s) (*exnraise (racket s))]))
(define-syntax Exn
(syntax-rules ()
[(_ s) (scheme s)]))
[(_ s) (racket s)]))
(provide exnraise Exn)
(provide margin-note/ref
@ -132,6 +132,6 @@
(define-syntax speed
(syntax-rules ()
[(_ id what)
(t "An " (scheme id) " application can provide better performance for "
(t "An " (racket id) " application can provide better performance for "
(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
@(require "mz.rkt")
@(define lit-ellipsis (scheme ...))
@(define lit-ellipsis (racket ...))
@(define syntax-eval
(lambda ()

View File

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

View File

@ -628,9 +628,9 @@ library; they are here for backwards compatibility and to provide links to the
[(drr-parent drr-vars drr-var-defs-in-sig drr-stx-defs-in-sig) (signature-members #'drracket:tool-cm^ #'here)])
(with-syntax ([(drs-id ...) drs-vars]
[(drr-id ...) drr-vars])
#'(begin
#'(begin
(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[]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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