From 4cd2614c2122dd13e75d2dccc60e11109e26e152 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 13 Jul 2008 17:13:20 +0000 Subject: [PATCH] scribble fixes -- nested @scheme and a few other similar problems svn: r10744 --- collects/compiler/cffi.scrbl | 2 +- collects/parser-tools/parser-tools.scrbl | 4 ++-- collects/scribblings/framework/frame.scrbl | 6 +++--- collects/scribblings/gui/snip-class.scrbl | 4 ++-- .../scribblings/gui/text-field-class.scrbl | 6 +++--- .../scribblings/htdp-langs/beginner-abbr.scrbl | 6 +++--- collects/scribblings/htdp-langs/beginner.scrbl | 2 +- collects/scribblings/mzc/exe-api.scrbl | 2 +- collects/scribblings/reference/bytes.scrbl | 4 ++-- collects/scribblings/reference/class.scrbl | 2 +- .../scribblings/reference/cont-marks.scrbl | 2 +- .../scribblings/reference/eval-model.scrbl | 18 +++++++++++------- collects/scribblings/reference/numbers.scrbl | 8 ++++---- collects/scribblings/reference/strings.scrbl | 4 ++-- collects/scribblings/reference/stx-ops.scrbl | 4 ++-- collects/scribblings/reference/stx-trans.scrbl | 6 +++--- collects/scribblings/scribble/style.scrbl | 2 +- collects/teachpack/htdp/scribblings/draw.scrbl | 2 +- .../teachpack/htdp/scribblings/image.scrbl | 2 +- collects/web-server/scribblings/running.scrbl | 15 ++++++++------- .../scribblings/web-config-unit.scrbl | 3 ++- 21 files changed, 55 insertions(+), 49 deletions(-) diff --git a/collects/compiler/cffi.scrbl b/collects/compiler/cffi.scrbl index 06cfa66e9a..e12a084c37 100644 --- a/collects/compiler/cffi.scrbl +++ b/collects/compiler/cffi.scrbl @@ -123,7 +123,7 @@ functions to be called through @scheme[c-lambda]. The @scheme[c-include] form expands to a @scheme[c-declare] form using the content of a specified file. Use @scheme[(c-include _file)] instead -of @scheme[(c-declare "#include @scheme[_file]")] when it's easier to +of @scheme[(c-declare "#include file")] when it's easier to have MzScheme resolve the file path than to have the C compiler resolve it. diff --git a/collects/parser-tools/parser-tools.scrbl b/collects/parser-tools/parser-tools.scrbl index df139180d3..04144bfddd 100644 --- a/collects/parser-tools/parser-tools.scrbl +++ b/collects/parser-tools/parser-tools.scrbl @@ -455,8 +455,8 @@ the right choice when using @scheme[lexer] in other situations. Like @scheme[define-tokens], except a each token constructor - @schemeidfont{token-}@scheme[token-id] take nos arguments and returns - @scheme[(@scheme[quote] token-id)].} + @schemeidfont{token-}@scheme[token-id] takes no arguments and returns + @scheme[(#, @scheme[quote] token-id)].} @defproc[(token-name [t (or/c token? symbol?)]) symbol?]{ diff --git a/collects/scribblings/framework/frame.scrbl b/collects/scribblings/framework/frame.scrbl index bd5dd98937..f7566989d4 100644 --- a/collects/scribblings/framework/frame.scrbl +++ b/collects/scribblings/framework/frame.scrbl @@ -541,7 +541,7 @@ - Calls @scheme[(make-object @method[frame:editor<%> get-editor%])]. + Calls @scheme[(make-object #, @method[frame:editor<%> get-editor%])]. } @defmethod*[(((revert) void))]{ @@ -794,7 +794,7 @@ } @defmethod*[#:mode override (((get-editor<%>) interface))]{ - Returns @scheme[(class->interface @scheme[text%])]. + Returns @scheme[(class->interface text%)]. } } @definterface[frame:pasteboard<%> (frame:editor<%>)]{ @@ -812,7 +812,7 @@ } @defmethod*[#:mode override (((get-editor<%>) interface))]{ - Returns @scheme[(class->interface @scheme[pasteboard%])]. + Returns @scheme[(class->interface pasteboard%)]. } } @definterface[frame:delegate<%> (frame:status-line<%> frame:text<%>)]{ diff --git a/collects/scribblings/gui/snip-class.scrbl b/collects/scribblings/gui/snip-class.scrbl index 01728a186b..d8f94577d2 100644 --- a/collects/scribblings/gui/snip-class.scrbl +++ b/collects/scribblings/gui/snip-class.scrbl @@ -551,7 +551,7 @@ The @scheme[x] and @scheme[y] arguments are the snip's @scheme[editorx] and @scheme[editory] arguments are the snip's @techlink{location} in editor coordinates. To get @scheme[event]'s x @techlink{location} in snip coordinates, subtract @scheme[x] from - @scheme[(send @scheme[event] get-x)]. + @scheme[(send event get-x)]. See also @indexed-scheme['handles-events] in @method[snip% get-flags]. @@ -581,7 +581,7 @@ The @scheme[x] and @scheme[y] arguments are the snip's @scheme[editorx] and @scheme[editory] arguments are the snip's @techlink{location} in editor coordinates. To get @scheme[event]'s x @techlink{location} in snip coordinates, subtract @scheme[x] from - @scheme[(send @scheme[event] get-x)]. + @scheme[(send event get-x)]. See also @indexed-scheme['handles-events] in @method[snip% get-flags]. diff --git a/collects/scribblings/gui/text-field-class.scrbl b/collects/scribblings/gui/text-field-class.scrbl index b0e70363f6..e8d1140b69 100644 --- a/collects/scribblings/gui/text-field-class.scrbl +++ b/collects/scribblings/gui/text-field-class.scrbl @@ -103,13 +103,13 @@ For a text field, the most useful methods of a @scheme[text%] object are the following: @itemize{ - @item{@scheme[(send a-text @method[text% get-text])] returns + @item{@scheme[(send a-text #, @method[text% get-text])] returns the current text of the editor.} - @item{@scheme[(send a-text @method[text% erase])] deletes all text from + @item{@scheme[(send a-text #, @method[text% erase])] deletes all text from the editor.} - @item{@scheme[(send a-text @method[text% insert] _str)] inserts + @item{@scheme[(send a-text #, @method[text% insert] _str)] inserts @scheme[_str] into the editor at the current caret position.} } diff --git a/collects/scribblings/htdp-langs/beginner-abbr.scrbl b/collects/scribblings/htdp-langs/beginner-abbr.scrbl index 117ce6ed02..bba47aa84f 100644 --- a/collects/scribblings/htdp-langs/beginner-abbr.scrbl +++ b/collects/scribblings/htdp-langs/beginner-abbr.scrbl @@ -70,7 +70,7 @@ Creates symbols and abbreviates nested lists. Normally, this form is written with a @litchar{'}, like @scheme['(apple banana)], but it can also be written with @scheme[quote], like -@scheme[((unsyntax @scheme[quote]) (apple banana))].} +@scheme[(#, @scheme[quote] (apple banana))].} @; ---------------------------------------- @@ -86,8 +86,8 @@ to expression ``unquotes.'' Normally, this form is written with a backquote, @litchar{`}, like @scheme[`(apple ,(+ 1 2))], but it can also be written with -@scheme[quasiquote], like @scheme[((unsyntax @scheme[quasiquote]) -(apple ,(+ 1 2)))].} +@scheme[quasiquote], like +@scheme[(#, @scheme[quasiquote] (apple ,(+ 1 2)))].} @deftogether[( diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index b4fb30a8b6..1a98714d4c 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -276,7 +276,7 @@ A quoted @scheme[id] is a symbol. A symbol is a constant, like Normally, a symbol is written with a @litchar{'}, like @scheme['apple], but it can also be written with @scheme[quote], like -@scheme[((unsyntax @scheme[quote]) apple)]. +@scheme[(#, @scheme[quote] apple)]. The @scheme[id] for a symbol is a sequence of characters not including a space or one of the following:} diff --git a/collects/scribblings/mzc/exe-api.scrbl b/collects/scribblings/mzc/exe-api.scrbl index 6d0982a82e..4d0da7ae28 100644 --- a/collects/scribblings/mzc/exe-api.scrbl +++ b/collects/scribblings/mzc/exe-api.scrbl @@ -125,7 +125,7 @@ are provided to the embedding executable. A command-line argument that evaluates an expression or loads a file will be executed after the embedded code is loaded. -Each element of the @scheme[@:modules] argument @scheme[mod-list] is a +Each element of the @scheme[#:modules] argument @scheme[mod-list] is a two-item list, where the first item is a prefix for the module name, and the second item is a module path datum (that's in the format understood by the default module name resolver). The prefix can be a diff --git a/collects/scribblings/reference/bytes.scrbl b/collects/scribblings/reference/bytes.scrbl index 4b5135a924..2c8af4b3a3 100644 --- a/collects/scribblings/reference/bytes.scrbl +++ b/collects/scribblings/reference/bytes.scrbl @@ -153,7 +153,7 @@ string. @defproc[(bytes->list [bstr bytes?]) (listof byte?)]{ Returns a new list of bytes coresponding to the content of @scheme[bstr]. That is, - the length of the list is @scheme[(bytes-length @scheme[bstr])], and the + the length of the list is @scheme[(bytes-length bstr)], and the sequence of bytes of @scheme[bstr] are in the same sequence in the result list. @@ -162,7 +162,7 @@ string. @defproc[(list->bytes [lst (listof byte?)]) bytes?]{ Returns a new mutable bytes whose content is the list of bytes in @scheme[lst]. - That is, the length of the bytes is @scheme[(length @scheme[lst])], and + That is, the length of the bytes is @scheme[(length lst)], and the sequence of bytes in @scheme[lst] is in the same sequence in the result bytes. diff --git a/collects/scribblings/reference/class.scrbl b/collects/scribblings/reference/class.scrbl index 9d57b15915..c56c392058 100644 --- a/collects/scribblings/reference/class.scrbl +++ b/collects/scribblings/reference/class.scrbl @@ -1472,7 +1472,7 @@ the @scheme[interface-expr]s, and the @scheme[class-clause]s are as in This forms can only be used at the top level, either within a module or outside. The @scheme[class-id] identifier is bound to the new -class, and @scheme[deserialize-info:@scheme[class-id]] is also +class, and @scheme[deserialize-info:]@scheme[class-id] is also defined; if the definition is within a module, then the latter is provided from the module. diff --git a/collects/scribblings/reference/cont-marks.scrbl b/collects/scribblings/reference/cont-marks.scrbl index a77b3d0263..1e13975380 100644 --- a/collects/scribblings/reference/cont-marks.scrbl +++ b/collects/scribblings/reference/cont-marks.scrbl @@ -20,7 +20,7 @@ The list of continuation marks for a key @scheme[_k] and a continuation @scheme[null].} @item{If @scheme[_C]'s first frame contains a mark @scheme[_m] for @scheme[_k], - then the mark list for @scheme[_C] is @scheme[(cons @scheme[_m] _lst)], + then the mark list for @scheme[_C] is @scheme[(cons _m _lst)], where @scheme[_lst] is the mark list for @scheme[_k] in @cont[0].} @item{If @scheme[_C]'s first frame does not contain a mark keyed by diff --git a/collects/scribblings/reference/eval-model.scrbl b/collects/scribblings/reference/eval-model.scrbl index cc0dc136ac..86d85425e5 100644 --- a/collects/scribblings/reference/eval-model.scrbl +++ b/collects/scribblings/reference/eval-model.scrbl @@ -15,17 +15,21 @@ @(define hole (make-element #f (list "[]"))) @(define (*sub c e) (make-element #f (list c "[" e "]"))) -@(define langle (make-element 'tt (list "<"))) -@(define rangle (make-element 'tt (list ">"))) -@(define comma (make-element 'tt (list ", "))) @(define-syntax sub (syntax-rules () [(_ a b) (*sub (scheme a) (scheme b))])) -@(define (*state c e) (make-element #f (list langle c comma e rangle))) -@(define-syntax state - (syntax-rules () [(_ a b) (*state (scheme a) (scheme b))])) @(define (frame n) (make-element "schemevariable" (list "C" (make-element 'subscript (list (format "~a" n)))))) +@;{ +These are not used; if they do get back in, then it's probably better +to switch to the usual langle/rangle that is used in syntax definitions. +@(define langle (make-element 'tt (list "<"))) +@(define rangle (make-element 'tt (list ">"))) +@(define comma (make-element 'tt (list ", "))) +@(define (*state c e) (make-element #f (list langle c comma e rangle))) +@(define-syntax state + (syntax-rules () [(_ a b) (*state (scheme a) (scheme b))])) +;} @;------------------------------------------------------------------------ @title[#:tag "eval-model"]{Evaluation Model} @@ -59,7 +63,7 @@ Some simplifications require more than one step. For example: An expression that is not a @tech{value} can always be partitioned into two parts: a @deftech{redex}, which is the part that changed in a -single-step simplification (show in blue), and the +single-step simplification (highlighted), and the @deftech{continuation}, which is the surrounding expression context. In @scheme[(- 4 (+ 1 1))], the redex is @scheme[(+ 1 1)], and the continuation is @scheme[(- 4 #, @hole)], where @hole takes the diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 6dee848033..e8ff2b2743 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -203,7 +203,7 @@ otherwise.} @defproc*[([(- [z number?]) number?] [(- [z number?] [w number?] ...+) number?])]{ - When no @scheme[w]s are supplied, returns @scheme[(- 0 #, @scheme[z])]. + When no @scheme[w]s are supplied, returns @scheme[(- 0 z)]. Otherwise, returns the subtraction of the @scheme[w]s from @scheme[z] working pairwise from left to right.} @@ -219,7 +219,7 @@ otherwise.} @defproc*[([(/ [z number?]) number?] [(/ [z number?] [w number?] ...+) number?])]{ - When no @scheme[w]s are supplied, returns @scheme[(/ 1 #, @scheme[z])]. + When no @scheme[w]s are supplied, returns @scheme[(/ 1 z)]. Otherwise, returns the division @scheme[z] by the var[w]s working pairwise from left to right.} @@ -576,8 +576,8 @@ produces @scheme[+nan.0] in the case that neither @scheme[y] nor (semi-infinite) two's complement representation. If @scheme[m] is non-negative, the integer @scheme[n] is shifted left by @scheme[m] bits; i.e., @scheme[m] new zeros are introduced as rightmost digits. If - @scheme[m] is negative, @scheme[n] is shifted right by @scheme[(- #, - @scheme[m])] bits; i.e., the rightmost @scheme[m] digits are dropped. + @scheme[m] is negative, @scheme[n] is shifted right by @scheme[(- m)] + bits; i.e., the rightmost @scheme[m] digits are dropped. @examples[(arithmetic-shift 1 10) (arithmetic-shift 255 -3)]} diff --git a/collects/scribblings/reference/strings.scrbl b/collects/scribblings/reference/strings.scrbl index 9450f41513..0b83db4a46 100644 --- a/collects/scribblings/reference/strings.scrbl +++ b/collects/scribblings/reference/strings.scrbl @@ -145,7 +145,7 @@ contains the concatenated characters of the given @scheme[str]s. If no @defproc[(string->list [str string?]) (listof char?)]{ Returns a new list of characters coresponding to the content of @scheme[str]. That is, - the length of the list is @scheme[(string-length @scheme[str])], and the + the length of the list is @scheme[(string-length str)], and the sequence of characters of @scheme[str] are in the same sequence in the result list. @@ -154,7 +154,7 @@ contains the concatenated characters of the given @scheme[str]s. If no @defproc[(list->string [lst (listof char?)]) string?]{ Returns a new mutable string whose content is the list of characters in @scheme[lst]. - That is, the length of the string is @scheme[(length @scheme[lst])], and + That is, the length of the string is @scheme[(length lst)], and the sequence of characters in @scheme[lst] is in the same sequence in the result string. diff --git a/collects/scribblings/reference/stx-ops.scrbl b/collects/scribblings/reference/stx-ops.scrbl index ace386c5fc..3b5b1c5c64 100644 --- a/collects/scribblings/reference/stx-ops.scrbl +++ b/collects/scribblings/reference/stx-ops.scrbl @@ -88,10 +88,10 @@ for the module whose source contains @scheme[stx], or @scheme[#f] if Unwraps the immediate datum structure from a @tech{syntax object}, leaving nested syntax structure (if any) in place. The result of -@scheme[(syntax-e @scheme[stx])] is one of the following: +@scheme[(syntax-e stx)] is one of the following: @itemize{ - + @item{a symbol} @item{a @tech{syntax pair} (described below)} diff --git a/collects/scribblings/reference/stx-trans.scrbl b/collects/scribblings/reference/stx-trans.scrbl index 0c0dd8130c..78fdf8649a 100644 --- a/collects/scribblings/reference/stx-trans.scrbl +++ b/collects/scribblings/reference/stx-trans.scrbl @@ -386,9 +386,9 @@ its lexical information, and if the current expansion context is not a @tech{module context}. If a binding of @scheme[inner-identifier] shadows @scheme[id-stx], the -result is the same as @scheme[(syntax-local-get-shadower -@scheme[inner-identifier])], except that it has the location and -properties of @scheme[id-stx]. +result is the same as +@scheme[(syntax-local-get-shadower inner-identifier)], except that it +has the location and properties of @scheme[id-stx]. Otherwise, the result is the same as @scheme[id-stx] with its module bindings (if any) removed from its lexical information, and the diff --git a/collects/scribblings/scribble/style.scrbl b/collects/scribblings/scribble/style.scrbl index d4d8d566d2..1590a2c469 100644 --- a/collects/scribblings/scribble/style.scrbl +++ b/collects/scribblings/scribble/style.scrbl @@ -27,7 +27,7 @@ Prefer ``function'' to ``procedure.'' Avoid cut-and-paste for descriptive text. If two functions are similar, consider documenting them together with @scheme[deftogether]. To abstract a description, consider using -explicit prose abstraction, such as ``@scheme[x] is like @scheme[@y], +explicit prose abstraction, such as ``@scheme[x] is like @scheme[y], except that ...,'' instead of abstracting the source and instantiating it multiple times; often, a prose abstraction is clearer to the reader than a hidden abstraction in the document implementation. diff --git a/collects/teachpack/htdp/scribblings/draw.scrbl b/collects/teachpack/htdp/scribblings/draw.scrbl index 1034779563..2b7d09ea5a 100644 --- a/collects/teachpack/htdp/scribblings/draw.scrbl +++ b/collects/teachpack/htdp/scribblings/draw.scrbl @@ -91,7 +91,7 @@ The following functions allow programs to react to events from the canvas. @defproc[(on-key-event [change (-> (unsyntax @tech{DrawKeyEvent}) (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) true]{Adds @scheme[change] to the world. The function reacts to keyboard -events and creates a new @scheme[(unsyntax @tech{DrawWorld})].} +events and creates a new @scheme[#, @tech{DrawWorld}].} @defproc[(on-tick-event [tock (-> (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) true]{Adds @scheme[tock] to the world. The function reacts to clock tick events, creating a new diff --git a/collects/teachpack/htdp/scribblings/image.scrbl b/collects/teachpack/htdp/scribblings/image.scrbl index 2569a0b164..31a73a6395 100644 --- a/collects/teachpack/htdp/scribblings/image.scrbl +++ b/collects/teachpack/htdp/scribblings/image.scrbl @@ -230,7 +230,7 @@ and converts a list of colors into an image. #reader scribble/comment-reader (schemeblock ;; -- @scheme[empty] -;; -- @scheme[(cons (unsyntax @tech{Color}) List-of-color)] +;; -- @scheme[(cons #, @tech{Color} List-of-color)] ;; Interpretation: represents a list of colors. )) diff --git a/collects/web-server/scribblings/running.scrbl b/collects/web-server/scribblings/running.scrbl index ccf8387a92..e009d7db15 100644 --- a/collects/web-server/scribblings/running.scrbl +++ b/collects/web-server/scribblings/running.scrbl @@ -23,10 +23,11 @@ default configuration shipped with the server is used. The optional port and ip-address arguments override the corresponding portions of the @scheme[configuration-table]. -The @scheme[configuration-table] is given to @scheme[configuration-table->web-config\@] -and used to construct a @scheme[web-config^] unit, -and is linked with the @scheme[web-server\@] unit. The resulting unit is invoked, and -the server runs until the process is killed. +The @scheme[configuration-table] is given to +@scheme[configuration-table->web-config@] and used to construct a +@scheme[web-config^] unit, and is linked with the +@scheme[web-server@] unit. The resulting unit is invoked, and the +server runs until the process is killed. To run the web server with MrEd, use @@ -49,10 +50,10 @@ dispatcher. See @filepath{run.ss} for an example of such a script. [#:max-waiting max-waiting integer? 40] [#:initial-connection-timeout initial-connection-timeout integer? 60]) (-> void)]{ - Constructs an appropriate @scheme[dispatch-config^], invokes the @scheme[dispatch-server\@], - and calls its @scheme[serve] function. + Constructs an appropriate @scheme[dispatch-config^], invokes the + @scheme[dispatch-server@], and calls its @scheme[serve] function. } - + @; XXX Not the right `server' above. Here's an example of a simple web server that serves files diff --git a/collects/web-server/scribblings/web-config-unit.scrbl b/collects/web-server/scribblings/web-config-unit.scrbl index 5598e66f8b..b3ff526f94 100644 --- a/collects/web-server/scribblings/web-config-unit.scrbl +++ b/collects/web-server/scribblings/web-config-unit.scrbl @@ -55,7 +55,8 @@ Provides contains the following identifiers. [#:listen-ip listen-ip (or/c false/c string?) #f] [#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)]) (unit? web-config^)]{ - Reads the S-expression at @scheme[path] and calls @scheme[configuration-table-sexpr->web-config\@] appropriately. + Reads the S-expression at @scheme[path] and calls + @scheme[configuration-table-sexpr->web-config@] appropriately. } @defproc[(configuration-table-sexpr->web-config\@ [sexpr list?]