Lots of minor edits -- mainly dropping unnecessary backslashes and

using @litchar with braces.

svn: r11451
This commit is contained in:
Eli Barzilay 2008-08-27 08:35:27 +00:00
parent 1cbf54d70a
commit d26f27e140
27 changed files with 381 additions and 381 deletions

View File

@ -119,7 +119,7 @@ window to the interactions window (or the search window, if it is open).}
@keybinding["M-("]{wrap selection in parentheses}
@keybinding["M-["]{wrap selection in square brackets}
@keybinding["M-{"]{wrap selection in curly brackets}
@keybinding["M-S-L"]{wrap selection in @litchar["(lambda\u20()\u20"]...@litchar{)}
@keybinding["M-S-L"]{wrap selection in @litchar{(lambda () }...@litchar{)}
and put the insertion point in the arglist of the lambda}
@keybinding["C-c C-o"]{the sexpression following the

View File

@ -40,7 +40,7 @@ The preferences dialog consists of several panels.
@item{@onscreen{Square bracket}
This panel controls which keywords DrScheme uses to determine
when to rewrite @litchar["["] to @litchar["("]. For
when to rewrite @litchar{[} to @litchar{(}. For
@scheme[cond]-like keywords, the number in parenthesis indicates
how many sub-expressions are skipped before square brackets are
started.
@ -134,10 +134,10 @@ The preferences dialog consists of several panels.
the blinking caret is next to a parenthesis.}
@item{@PrefItem{Correct parens} --- If checked, the editor
automatically converts a typed @litchar[")"] to @litchar["]"] to
match @litchar["["], or it converts a typed @litchar["]"] to
@litchar[")"] to match @litchar["("]. Also, the editor changes
typed @litchar["["] to match the context (as explained in
automatically converts a typed @litchar{)} to @litchar{]} to
match @litchar{[}, or it converts a typed @litchar{]} to
@litchar{)} to match @litchar{(}. Also, the editor changes
typed @litchar{[} to match the context (as explained in
@secref["editor"]).}
@item{@PrefItem{Flash paren match} --- If checked, typing a closing

View File

@ -21,26 +21,26 @@ Whether a programmer or a user, see @scheme[font-name-directory<%>] for
an overview of the font mapping system.
To find a font name for a family, MrEd looks for a preference name by
concatenating @litchar["MrEd:"], a @nonterm{dest}, a @nonterm{type},
concatenating @litchar{MrEd:}, a @nonterm{dest}, a @nonterm{type},
a @nonterm{weight}, and a @nonterm{style}, where
@itemize{
@item{@nonterm{dest} is either @litchar["Screen"] or @litchar["PostScript"].}
@item{@nonterm{dest} is either @litchar{Screen} or @litchar{PostScript}.}
@item{@nonterm{type} is either @litchar["Default"], @litchar["Decorative"], @litchar["Roman"], @litchar["Script"],
@litchar["Swiss"], @litchar["Modern"], @litchar["System"], or @litchar["Symbol"] for a mapping
@item{@nonterm{type} is either @litchar{Default}, @litchar{Decorative}, @litchar{Roman}, @litchar{Script},
@litchar{Swiss}, @litchar{Modern}, @litchar{System}, or @litchar{Symbol} for a mapping
defining the default font for a family. Otherwise, it is a
face name prefixed with @litchar["@"].}
@item{@nonterm{weight} is either @litchar["Medium"], @litchar["Bold"], or @litchar["Light"].}
@item{@nonterm{weight} is either @litchar{Medium}, @litchar{Bold}, or @litchar{Light}.}
@item{@nonterm{style} is either @litchar["Straight"], @litchar["Italic"], or @litchar["Slant"].}
@item{@nonterm{style} is either @litchar{Straight}, @litchar{Italic}, or @litchar{Slant}.}
}
Furthermore, any of the latter three parts can be wildcarded with
@litchar["_"], as described below. The concatenated string is converted
@litchar{_}, as described below. The concatenated string is converted
to a symbol (preserving case), and the associated preference value
must be a string.
@ -59,7 +59,7 @@ Building items names by concatenating @nonterm{dest}, @nonterm{type},
preferences via a wildcarding search.
The @nonterm{type}, @nonterm{weight}, and @nonterm{style} parts of a preference name
can be wildcarded by using @litchar["_"]. Thus, to set the default font
can be wildcarded by using @litchar{_}. Thus, to set the default font
in X for all types, weights, and styles, use the following preference
entry:
@ -101,15 +101,15 @@ Suppose we define the mapping for variants of @scheme["Default"], and
but the MrEd font-reading system provides a better syntax for
referencing another preference entry. When a preference value contains
@litchar["${x}"], then the @litchar["${x}"] fragment is replaced by the
preference value of @litchar["x"]. Thus, the above can be re-written:
@litchar{${x}}, then the @litchar{${x}} fragment is replaced by the
preference value of @litchar{x}. Thus, the above can be re-written:
@schemeblock[
(|MrEd:ScreenDefault__| "+-*-*-medium-r-normal-*-*-%d-*-*-*-*-*-*")
(|MrEd:ScreenRoman__| "${ScreenDefault__}")
]
A mini-language of @litchar["${x}"] is used within the string (instead
A mini-language of @litchar{${x}} is used within the string (instead
of an S-expression format) for historical reasons.
@; ------------------------------------------------------------------------
@ -118,9 +118,9 @@ A mini-language of @litchar["${x}"] is used within the string (instead
Variables can be used with referencing to configure default values
based on the weight and style that is needed. When a preference
value contains @litchar["$[weight]"], then @litchar["$[weight]"] is
value contains @litchar{$[weight]}, then @litchar{$[weight]} is
replaced with a string for the desired font weight. Similarly,
@litchar["$[style]"] is replaced with the desired style. Variable
@litchar{$[style]} is replaced with the desired style. Variable
expressions can be embedded within referencing expressions, as in the
following example:
@ -134,10 +134,10 @@ Variables can be used with referencing to configure default values
Now, when the @Resource{ScreenDefault__} value is used for different
weights, it will return different values; the
@litchar["${Def$[weight]}"] expression will turn into
@litchar["${DefMedium}"] for a medium-weight lookup, or
@litchar["${DefBold}"] for a bold-weight lookup. These references
will in turn give either @litchar["medium"] or @litchar["bold"].
@litchar{${Def$[weight]}} expression will turn into
@litchar{${DefMedium}} for a medium-weight lookup, or
@litchar{${DefBold}} for a bold-weight lookup. These references
will in turn give either @litchar{medium} or @litchar{bold}.
@; ------------------------------------------------------------------------
@ -163,11 +163,11 @@ The effect of this statement is probably not what was intended; when a
(|MrEd:ScreenRoman__| "${ScreenDefault$[weight]_}")
]
but this does not work either. It works fine for bold @litchar["Roman"],
now, but medium @litchar["Roman"] will cause a reference to the
but this does not work either. It works fine for bold @litchar{Roman},
now, but medium @litchar{Roman} will cause a reference to the
@Resource{ScreenDefaultMedium_}, which doesn't exist. The problem is
that our reference does not use wildcarding like the original medium
@litchar["Roman"] lookup did.
@litchar{Roman} lookup did.
Wildcarding can be specified in a reference by separating each
wildcardable field with a comma. The following preference specification
@ -179,9 +179,9 @@ Wildcarding can be specified in a reference by separating each
(|MrEd:ScreenRoman__| "${ScreenDefault,$[weight],_}")
]
Since @litchar["$[weight]"] is between commas, it can be wildcarded if
no name exactly matching @litchar["SchemeDefault$[weight]_"] is
found. In this case @litchar["SchemeDefault"] and @litchar["_"] can
Since @litchar{$[weight]} is between commas, it can be wildcarded if
no name exactly matching @litchar{SchemeDefault$[weight]_} is
found. In this case @litchar{SchemeDefault} and @litchar{_} can
also be wildcarded, but this will have no effect.
The wildcarding used in references need not reflect the wildcarding

View File

@ -60,30 +60,30 @@ Under Windows and Mac OS X, a face name is interpreted simply as a
first available font is used to draw text, and later fonts are
substituted for missing characters in earlier fonts.}
@item{If the string begins with @litchar["+"], then the remainder of the
@item{If the string begins with @litchar{+}, then the remainder of the
string is interpreted as an X font name. These names are
usually long, such as
@litchar["+-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1"].
@litchar{+-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1}.
As usual for X font names, asterisks may appear in the string
as wildcards. Furthermore, the size of the font can be
parameterized by using @litchar["%d"] in the place of a specific
parameterized by using @litchar{%d} in the place of a specific
point size; if an asterisk appears in place of the pixel size,
the asterisk and @litchar["%d"] are swapped when the font size is
the asterisk and @litchar{%d} are swapped when the font size is
specified in pixels (otherwise the size is always interpreted
as points). For rotated text, @litchar["%d"] will be replaced by
as points). For rotated text, @litchar{%d} will be replaced by
a transformation matrix.}
@item{A string of the form
@litchar["-"]@nonterm{provider}@litchar{-}@nonterm{font} is
@litchar{-}@nonterm{provider}@litchar{-}@nonterm{font} is
equivalent to
@litchar["+-"]@nonterm{provider}@litchar{-}@nonterm{font}@litchar{-}@nonterm{weight}@litchar{-}@nonterm{style}@litchar{-normal-*-*-%d-*-*-*-*-*-*},
@litchar{+-}@nonterm{provider}@litchar{-}@nonterm{font}@litchar{-}@nonterm{weight}@litchar{-}@nonterm{style}@litchar{-normal-*-*-%d-*-*-*-*-*-*},
where @nonterm{weight} is either @litchar{medium},
@litchar{light}, or @litchar{bold} (depending on the requested
weight mapping) and @nonterm{style} is either @litchar{r},
@litchar{i}, or @litchar{i} (depending on the requested style
mapping).}
@item{A string of the form @litchar["-"]@nonterm{font} is
@item{A string of the form @litchar{-}@nonterm{font} is
equivalent to @litchar{-*-}@nonterm{font}.}
@item{A string of any other format is interpreted as an X font name,

View File

@ -192,93 +192,93 @@ If a particular modifier is not mentioned in a state string, it
pressed.
A key identifier can be either a character on the keyboard (e.g.,
@litchar["a"], @litchar["2"], @litchar["?"]) or a special name. The
@litchar{a}, @litchar{2}, @litchar{?}) or a special name. The
special names are as follows:
@itemize{
@item{@litchar["leftbutton"] (button down)}
@item{@litchar["rightbutton"]}
@item{@litchar["middlebutton"]}
@item{@litchar["leftbuttondouble"] (button down for double-click)}
@item{@litchar["rightbuttondouble"]}
@item{@litchar["middlebuttondouble"]}
@item{@litchar["leftbuttontriple"] (button down for triple-click)}
@item{@litchar["rightbuttontriple"]}
@item{@litchar["middlebuttontriple"]}
@item{@litchar["leftbuttonseq"] (all events from button down through button up)}
@item{@litchar["rightbuttonseq"]}
@item{@litchar["middlebuttonseq"]}
@item{@litchar["wheelup"]}
@item{@litchar["wheeldown"]}
@item{@litchar["esc"]}
@item{@litchar["delete"]}
@item{@litchar["del"] (same as @litchar["delete"])}
@item{@litchar["insert"]}
@item{@litchar["ins"] (same as @litchar["insert"])}
@item{@litchar["add"]}
@item{@litchar["subtract"]}
@item{@litchar["multiply"]}
@item{@litchar["divide"]}
@item{@litchar["backspace"]}
@item{@litchar["back"]}
@item{@litchar["return"]}
@item{@litchar["enter"] (same as @litchar["return"])}
@item{@litchar["tab"]}
@item{@litchar["space"]}
@item{@litchar["right"]}
@item{@litchar["left"]}
@item{@litchar["up"]}
@item{@litchar["down"]}
@item{@litchar["home"]}
@item{@litchar["end"]}
@item{@litchar["pageup"]}
@item{@litchar["pagedown"]}
@item{@litchar["semicolon"] (since @litchar{;} separates sequence steps)}
@item{@litchar["colon"] (since @litchar{:} separates modifiers)}
@item{@litchar["numpad0"]}
@item{@litchar["numpad1"]}
@item{@litchar["numpad2"]}
@item{@litchar["numpad3"]}
@item{@litchar["numpad4"]}
@item{@litchar["numpad5"]}
@item{@litchar["numpad6"]}
@item{@litchar["numpad7"]}
@item{@litchar["numpad8"]}
@item{@litchar["numpad9"]}
@item{@litchar["numpadenter"]}
@item{@litchar["f1"]}
@item{@litchar["f2"]}
@item{@litchar["f3"]}
@item{@litchar["f4"]}
@item{@litchar["f5"]}
@item{@litchar["f6"]}
@item{@litchar["f7"]}
@item{@litchar["f8"]}
@item{@litchar["f9"]}
@item{@litchar["f10"]}
@item{@litchar["f11"]}
@item{@litchar["f12"]}
@item{@litchar["f13"]}
@item{@litchar["f14"]}
@item{@litchar["f15"]}
@item{@litchar["f16"]}
@item{@litchar["f17"]}
@item{@litchar["f18"]}
@item{@litchar["f19"]}
@item{@litchar["f20"]}
@item{@litchar["f21"]}
@item{@litchar["f22"]}
@item{@litchar["f23"]}
@item{@litchar["f24"]}
@item{@litchar{leftbutton} (button down)}
@item{@litchar{rightbutton}}
@item{@litchar{middlebutton}}
@item{@litchar{leftbuttondouble} (button down for double-click)}
@item{@litchar{rightbuttondouble}}
@item{@litchar{middlebuttondouble}}
@item{@litchar{leftbuttontriple} (button down for triple-click)}
@item{@litchar{rightbuttontriple}}
@item{@litchar{middlebuttontriple}}
@item{@litchar{leftbuttonseq} (all events from button down through button up)}
@item{@litchar{rightbuttonseq}}
@item{@litchar{middlebuttonseq}}
@item{@litchar{wheelup}}
@item{@litchar{wheeldown}}
@item{@litchar{esc}}
@item{@litchar{delete}}
@item{@litchar{del} (same as @litchar{delete})}
@item{@litchar{insert}}
@item{@litchar{ins} (same as @litchar{insert})}
@item{@litchar{add}}
@item{@litchar{subtract}}
@item{@litchar{multiply}}
@item{@litchar{divide}}
@item{@litchar{backspace}}
@item{@litchar{back}}
@item{@litchar{return}}
@item{@litchar{enter} (same as @litchar{return})}
@item{@litchar{tab}}
@item{@litchar{space}}
@item{@litchar{right}}
@item{@litchar{left}}
@item{@litchar{up}}
@item{@litchar{down}}
@item{@litchar{home}}
@item{@litchar{end}}
@item{@litchar{pageup}}
@item{@litchar{pagedown}}
@item{@litchar{semicolon} (since @litchar{;} separates sequence steps)}
@item{@litchar{colon} (since @litchar{:} separates modifiers)}
@item{@litchar{numpad0}}
@item{@litchar{numpad1}}
@item{@litchar{numpad2}}
@item{@litchar{numpad3}}
@item{@litchar{numpad4}}
@item{@litchar{numpad5}}
@item{@litchar{numpad6}}
@item{@litchar{numpad7}}
@item{@litchar{numpad8}}
@item{@litchar{numpad9}}
@item{@litchar{numpadenter}}
@item{@litchar{f1}}
@item{@litchar{f2}}
@item{@litchar{f3}}
@item{@litchar{f4}}
@item{@litchar{f5}}
@item{@litchar{f6}}
@item{@litchar{f7}}
@item{@litchar{f8}}
@item{@litchar{f9}}
@item{@litchar{f10}}
@item{@litchar{f11}}
@item{@litchar{f12}}
@item{@litchar{f13}}
@item{@litchar{f14}}
@item{@litchar{f15}}
@item{@litchar{f16}}
@item{@litchar{f17}}
@item{@litchar{f18}}
@item{@litchar{f19}}
@item{@litchar{f20}}
@item{@litchar{f21}}
@item{@litchar{f22}}
@item{@litchar{f23}}
@item{@litchar{f24}}
}
For a special keyword, the capitalization does not matter. However,
capitalization is important for single-letter keynames. Furthermore,
single-letter ASCII keynames are treated specially: @litchar["A"] and
@litchar["s:a"] are both treated as @litchar["s:A"]. However, when
@litchar["c:"] is included under Windows without @litchar["m:"], or when
@litchar["d:"] is included under Mac OS X, then ASCII letters are not
upcased with @litchar["s:"], since the upcasing behavior of the Shift key
single-letter ASCII keynames are treated specially: @litchar{A} and
@litchar{s:a} are both treated as @litchar{s:A}. However, when
@litchar{c:} is included under Windows without @litchar{m:}, or when
@litchar{d:} is included under Mac OS X, then ASCII letters are not
upcased with @litchar{s:}, since the upcasing behavior of the Shift key
is cancelled by Control without Alt (under Windows) or by Command
(under Mac OS X).

View File

@ -9,11 +9,11 @@ A @deftech{string} is a fixed-length array of
@seclink["characters"]{characters}. It prints using doublequotes,
where doublequote and backslash characters within the string are
escaped with backslashes. Other common string escapes are supported,
including @litchar["\\n"] for a linefeed, @litchar["\\r"] for a
carriage return, octal escapes using @litchar["\\"] followed by up
to three octal digits, and hexadecimal escapes with @litchar["\\u"]
including @litchar{\n} for a linefeed, @litchar{\r} for a
carriage return, octal escapes using @litchar{\} followed by up
to three octal digits, and hexadecimal escapes with @litchar{\u}
(up to four digits). Unprintable characters in a string are normally
shown with @litchar["\\u"] when the string is printed.
shown with @litchar{\u} when the string is printed.
@refdetails/gory["parse-string"]{the syntax of strings}

View File

@ -19,7 +19,7 @@ character datatype is separate from numbers. The
@scheme[char->integer] and @scheme[integer->char] procedures convert
between scalar-value numbers and the corresponding character.
A printable character normally prints as @litchar["#\\"] followed
A printable character normally prints as @litchar{#\} followed
by the represented character. An unprintable character normally prints
as @litchar{#\u} followed by the scalar value as hexadecimal
number. A few characters are printed specially; for example, the space

View File

@ -276,9 +276,9 @@ The @tech{metacharacter} @litchar{.} matches @emph{any} character
(regexp-match #rx"p.t" "pet")
]
The above pattern also matches @litchar["pat"], @litchar["pit"],
@litchar["pot"], @litchar["put"], and @litchar["p8t"], but not
@litchar["peat"] or @litchar["pfffft"].
The above pattern also matches @litchar{pat}, @litchar{pit},
@litchar{pot}, @litchar{put}, and @litchar{p8t}, but not
@litchar{peat} or @litchar{pfffft}.
A @deftech{character class} matches any one character from a set of
characters. A typical format for this is the @deftech{bracketed
@ -450,8 +450,8 @@ finer-tuned quantification than is possible with @litchar{*},
]
It is evident that @litchar{+} and @litchar{?} are abbreviations for
@litchar["{1,}"] and @litchar["{0,1}"] respectively, and @litchar{*}
abbreviates @litchar["{,}"], which is the same as @litchar["{0,}"].
@litchar{{1,}} and @litchar{{0,1}} respectively, and @litchar{*}
abbreviates @litchar{{,}}, which is the same as @litchar{{0,}}.
@interaction[
(regexp-match #px"[aeiou]{3}" "vacuous")

View File

@ -181,7 +181,7 @@ special characters
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
@litchar["{"] @litchar["}"]
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
@litchar{;} @litchar{#} @litchar["|"] @litchar["\\"]
@litchar{;} @litchar{#} @litchar{|} @litchar{\}
}
and except for the sequences of characters that make number constants,

View File

@ -42,7 +42,7 @@ whitespace and the following special characters:
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
@litchar["{"] @litchar["}"]
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
@litchar{;} @litchar{#} @litchar["|"] @litchar["\\"]
@litchar{;} @litchar{#} @litchar{|} @litchar{\}
}
Actually, @litchar{#} is disallowed only at the beginning of a symbol,
@ -50,7 +50,7 @@ and then only if not followed by @litchar{%}; otherwise, @litchar{#} is
allowed, too. Also, @litchar{.} by itself is not a symbol.
Whitespace or special characters can be included in an identifier by
quoting them with @litchar["|"] or @litchar["\\"]. These quoting
quoting them with @litchar{|} or @litchar{\}. These quoting
mechanisms are used in the printed form of identifiers that contain
special characters or that might otherwise look like numbers.

View File

@ -130,11 +130,11 @@ obvious Scheme character.
@subsection[#:tag "honu:parens"]{Parentheses, Brackets, and Braces}
A H-expression between @litchar{(} and @litchar{)}, @litchar["["] and
@litchar["]"], or @litchar["{"] and @litchar["}"] is represented by a
A H-expression between @litchar{(} and @litchar{)}, @litchar{[} and
@litchar{]}, or @litchar["{"] and @litchar["}"] is represented by a
Scheme list. The first element of the list is @scheme['#%parens] for a
@litchar{(}...@litchar{)} sequence, @scheme['#%brackets] for a
@litchar["["]...@litchar["]"] sequence, or @scheme['#%braces] for a
@litchar{[}...@litchar{]} sequence, or @scheme['#%braces] for a
@litchar["{"]...@litchar["}"] sequence. The remaining elements are the
Scheme representations for the grouped H-expressions in order.

View File

@ -365,7 +365,7 @@ by @scheme[path]. If @scheme[path] is omitted, a list of files and
directories in the current directory is returned. Under @|AllUnix|, an
element of the list can start with @litchar{./~} if it would otherwise
start with @litchar{~}. Under Windows, an element of the list may
start with @litchar["\\\\?\\REL\\\\"].}
start with @litchar{\\?\REL\\}.}
@defproc[(filesystem-root-list) (listof path?)]{

View File

@ -360,7 +360,7 @@ of the current user.}
Eliminates redundant path separators (except for a single trailing
separator), up-directory @litchar{..}, and same-directory @litchar{.}
indicators in @scheme[path], and changes @litchar{/} separators to
@litchar["\\"] separators in Windows paths, such that the result
@litchar{\} separators in Windows paths, such that the result
accesses the same file or directory (if it exists) as @scheme[path].
In general, the pathname is normalized as much as possible --- without
@ -405,11 +405,11 @@ information on simplifying Windows paths.}
Returns @scheme[path] with ``normalized'' case letters. For @|AllUnix|
paths, this procedure always returns the input path, because
filesystems for these platforms can be case-sensitive. For Windows
paths, if @scheme[path] does not start @litchar["\\\\?\\"], the
paths, if @scheme[path] does not start @litchar{\\?\}, the
resulting string uses only lowercase letters, based on the current
locale. In addition, for Windows paths when the path does not start
@litchar["\\\\?\\"], all @litchar{/}s are converted to
@litchar["\\"]s, and trailing spaces and @litchar{.}s are removed.
@litchar{\\?\}, all @litchar{/}s are converted to
@litchar{\}s, and trailing spaces and @litchar{.}s are removed.
The @scheme[path] argument can be a path for any platform, but beware
that local-sensitive decoding and conversion of the path may be

View File

@ -31,18 +31,18 @@ stream.
@section[#:tag "print-symbol"]{Printing Symbols}
Symbols containing spaces or special characters @scheme[write] using
escaping @litchar["\\"] and quoting @litchar{|}s. When the
escaping @litchar{\} and quoting @litchar{|}s. When the
@scheme[read-case-sensitive] parameter is set to @scheme[#f], then
symbols containing uppercase characters also use escaping escaping
@litchar["\\"] and quoting @litchar{|}s. In addition, symbols are
quoted with @litchar{|}s or leading @litchar["\\"] when they would
@litchar{\} and quoting @litchar{|}s. In addition, symbols are
quoted with @litchar{|}s or leading @litchar{\} when they would
otherwise print the same as a numerical constant or as a delimited
@scheme{.} (when @scheme[read-accept-dot] is @scheme[#t]).
When @scheme[read-accept-bar-quote] is @scheme[#t], @litchar{|}s are
used in printing when one @litchar{|} at the beginning and one
@litchar{|} at the end suffices to correctly print the
symbol. Otherwise, @litchar["\\"]s are always used to escape special
symbol. Otherwise, @litchar{\}s are always used to escape special
characters, instead of quoting them with @litchar{|}s.
When @scheme[read-accept-bar-quote] is @scheme[#f], then @litchar{|}
@ -51,7 +51,7 @@ special characters:
@t{
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
@litchar["["] @litchar["]"]
@litchar{[} @litchar{]}
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
@litchar{;} @litchar{\}
}
@ -122,15 +122,15 @@ The printed form of a pair is the same in both @scheme[write] and
By default, mutable pairs (as created with @scheme[mcons]) print the
same as pairs, except that @litchar["{"] and @litchar["}"] are used
instead of @litchar["("] and @litchar[")"]. Note that the reader
treats @litchar["{"]...@litchar["}"] and @litchar["("]...@litchar[")"]
instead of @litchar{(} and @litchar{)}. Note that the reader
treats @litchar["{"]...@litchar["}"] and @litchar{(}...@litchar{)}
equivalently on input, creating immutable pairs in both cases.
If the @scheme[print-pair-curly-braces] parameter is set to
@scheme[#t], then immutable pairs print using @litchar["{"] and
@litchar["}"]. If the @scheme[print-mpair-curly-braces] parameter is
set to @scheme[#f], then mutable pairs print using @litchar["("] and
@litchar[")"].
set to @scheme[#f], then mutable pairs print using @litchar{(} and
@litchar{)}.
@section{Printing Strings}

View File

@ -114,8 +114,8 @@ producing @scheme['hi] when the input is any one of \litchar{hi},
affects the way that @scheme[write] prints symbols containing
uppercase characters; if the parameter's value is @scheme[#f], then
symbols are printed with uppercase characters quoted by a
@litchar["\\"] or @litchar["|"]. The parameter's value is overridden by
quoting @litchar["\\"] or @litchar["|"] vertical-bar quotes and the
@litchar{\} or @litchar{|}. The parameter's value is overridden by
quoting @litchar{\} or @litchar{|} vertical-bar quotes and the
@litchar{#cs} and @litchar{#ci} prefixes; see
@secref["parse-symbol"] for more information. While a module is
loaded, the parameter is set to @scheme[#t] (see
@ -123,7 +123,7 @@ loaded, the parameter is set to @scheme[#t] (see
@defboolparam[read-square-bracket-as-paren on?]{
A parameter that controls whether @litchar["["] and @litchar["]"]
A parameter that controls whether @litchar{[} and @litchar{]}
are treated as parentheses. See @secref["parse-pair"] for more
information.}
@ -146,7 +146,7 @@ information.}
@defboolparam[read-accept-bar-quote on?]{
A parameter that controls parsing and printing of @litchar["|"] in
A parameter that controls parsing and printing of @litchar{|} in
symbols. See @secref["parse-symbol"] and @secref["printing"] for
more information.}

View File

@ -63,14 +63,14 @@ characters play special roles:
delimited sequence; its meaning depends on the characters that
follow; see below.}
@item{@as-index{@litchar["|"]} starts a subsequence of characters to
@item{@as-index{@litchar{|}} starts a subsequence of characters to
be included verbatim in the delimited sequence (i.e,. they are
never treated as delimiters, and they are not case-folded when
case-insensitivity is enabled); the subsequence is terminated
by another @litchar["|"], and neither the initial nor
terminating @litchar["|"] is part of the subsequence.}
by another @litchar{|}, and neither the initial nor
terminating @litchar{|} is part of the subsequence.}
@item{@as-index{@litchar["\\"]} outside of a @litchar["|"] pair causes
@item{@as-index{@litchar{\}} outside of a @litchar{|} pair causes
the folowing character to be included verbatim in a delimited
sequence.}
@ -103,26 +103,26 @@ on the next character or characters in the input stream as follows:
@dispatch[@litchar{#[}]{starts a vector; see @secref["parse-vector"]}
@dispatch[@litchar["#{"]]{starts a vector; see @secref["parse-vector"]}
@dispatch[@litchar["#s("]]{starts a structure literal; see @secref["parse-structure"]}
@dispatch[@litchar["#s["]]{starts a structure literal; see @secref["parse-structure"]}
@dispatch[@litchar{#s(}]{starts a structure literal; see @secref["parse-structure"]}
@dispatch[@litchar{#s[}]{starts a structure literal; see @secref["parse-structure"]}
@dispatch[@litchar["#s{"]]{starts a structure literal; see @secref["parse-structure"]}
@dispatch[@litchar["#\\"]]{starts a character; see @secref["parse-character"]}
@dispatch[@litchar{#\}]{starts a character; see @secref["parse-character"]}
@dispatch[@litchar{#"}]{starts a byte string; see @secref["parse-string"]}
@dispatch[@litchar{#%}]{starts a symbol; see @secref["parse-symbol"]}
@dispatch[@litchar{#:}]{starts a keyword; see @secref["parse-keyword"]}
@dispatch[@litchar{#&}]{starts a box; see @secref["parse-box"]}
@dispatch[@litchar["#|"]]{starts a block comment; see @secref["parse-comment"]}
@dispatch[@litchar["#;"]]{starts an S-expression comment; see @secref["parse-comment"]}
@dispatch[@litchar{#|}]{starts a block comment; see @secref["parse-comment"]}
@dispatch[@litchar{#;}]{starts an S-expression comment; see @secref["parse-comment"]}
@dispatch[@litchar{#,}]{starts a syntax quote; see @secref["parse-quote"]}
@dispatch[@litchar["#! "]]{starts a line comment; see @secref["parse-comment"]}
@dispatch[@litchar["#!/"]]{starts a line comment; see @secref["parse-comment"]}
@dispatch[@litchar["#!"]]{may start a reader extension; see @secref["parse-reader"]}
@dispatch[@litchar{#! }]{starts a line comment; see @secref["parse-comment"]}
@dispatch[@litchar{#!/}]{starts a line comment; see @secref["parse-comment"]}
@dispatch[@litchar{#!}]{may start a reader extension; see @secref["parse-reader"]}
@dispatch[@litchar{#`}]{starts a syntax quasiquote; see @secref["parse-quote"]}
@dispatch[@litchar{#,}]{starts an syntax [splicing] unquote; see @secref["parse-quote"]}
@dispatch[@litchar["#~"]]{starts compiled code; see @scheme[current-compile]}
@dispatch[@litchar{#~}]{starts compiled code; see @scheme[current-compile]}
@dispatch[@cilitchar{#i}]{starts a number; see @secref["parse-number"]}
@dispatch[@cilitchar{#e}]{starts a number; see @secref["parse-number"]}
@ -141,12 +141,12 @@ on the next character or characters in the input stream as follows:
@dispatch[@cilitchar["#sx"]]{starts a Scheme expression; see @secref["parse-honu"]}
@dispatch[@litchar["#hx"]]{starts a Honu expression; see @secref["parse-honu"]}
@dispatch[@litchar{#hx}]{starts a Honu expression; see @secref["parse-honu"]}
@dispatch[@litchar["#hash"]]{starts a hash table; see @secref["parse-hashtable"]}
@dispatch[@litchar{#hash}]{starts a hash table; see @secref["parse-hashtable"]}
@dispatch[@litchar["#reader"]]{starts a reader extension use; see @secref["parse-reader"]}
@dispatch[@litchar["#lang"]]{starts a reader extension use; see @secref["parse-reader"]}
@dispatch[@litchar{#reader}]{starts a reader extension use; see @secref["parse-reader"]}
@dispatch[@litchar{#lang}]{starts a reader extension use; see @secref["parse-reader"]}
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{(}}]{starts a vector; see @secref["parse-vector"]}
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{[}}]{starts a vector; see @secref["parse-vector"]}
@ -173,7 +173,7 @@ parse takes precedence over a symbol parse.
@index["case-sensitivity"]{@index["case-insensitive"]{When}} the
@scheme[read-case-sensitive] @tech{parameter} is set to @scheme[#f],
characters in the sequence that are not quoted by @litchar["|"] or
characters in the sequence that are not quoted by @litchar{|} or
@litchar{\} are first case-normalized. If the reader encounters
@as-index{@litchar{#ci}}, @litchar{#CI}, @litchar{#Ci}, or
@litchar{#cI}, then it recursively reads the following datum in
@ -298,7 +298,7 @@ input syntax for the boolean constant false.
@section[#:tag "parse-pair"]{Reading Pairs and Lists}
When the reader encounters a @as-index{@litchar{(}},
@as-index{@litchar["["]}, or @as-index{@litchar["{"]}, it starts
@as-index{@litchar{[}}, or @as-index{@litchar["{"]}, it starts
parsing a pair or list; see @secref["pairs"] for information on pairs
and lists.
@ -306,7 +306,7 @@ To parse the pair or list, the reader recursively reads data
until a matching @as-index{@litchar{)}}, @as-index{@litchar{]}}, or
@as-index{@litchar["}"]} (respectively) is found, and it specially handles
a delimited @litchar{.}. Pairs @litchar{()}, @litchar{[]}, and
@litchar["{}"] are treated the same way, so the remainder of this
@litchar{{}} are treated the same way, so the remainder of this
section simply uses ``parentheses'' to mean any of these pair.
If the reader finds no delimited @as-index{@litchar{.}} among the elements
@ -342,7 +342,7 @@ value @scheme[#\{].
If a delimited @litchar{.} appears in any other configuration, then
the @exnraise[exn:fail:read]. Similarly, if the reader encounters a
@litchar{)}, @litchar["]"], or @litchar["}"] that does not end a list
@litchar{)}, @litchar{]}, or @litchar["}"] that does not end a list
being parsed, then the @exnraise[exn:fail:read].
@reader-examples[
@ -379,7 +379,7 @@ exception, instead of the infix conversion.
When the reader encounters @as-index{@litchar{"}}, it begins parsing
characters to form a string. The string continues until it is
terminated by another @litchar{"} (that is not escaped by
@litchar["\\"]).
@litchar{\}).
Within a string sequence, the following escape sequences are
recognized:
@ -395,11 +395,11 @@ Within a string sequence, the following escape sequences are
@item{@as-index{@litchar{\r}}: return (ASCII 13)}
@item{@as-index{@litchar{\e}}: escape (ASCII 27)}
@item{@as-index{@litchar["\\\""]}: double-quotes (without terminating the string)}
@item{@as-index{@litchar["\\'"]}: quote (i.e., the backslash has no effect)}
@item{@as-index{@litchar["\\\\"]}: backslash (i.e., the second is not an escaping backslash)}
@item{@as-index{@litchar{\"}}: double-quotes (without terminating the string)}
@item{@as-index{@litchar{\'}}: quote (i.e., the backslash has no effect)}
@item{@as-index{@litchar{\\}}: backslash (i.e., the second is not an escaping backslash)}
@item{@as-index{@litchar["\\"]@kleenerange[1 3]{@nonterm{digit@sub{8}}}}:
@item{@as-index{@litchar{\}@kleenerange[1 3]{@nonterm{digit@sub{8}}}}:
Unicode for the octal number specified by @kleenerange[1
3]{digit@sub{8}} (i.e., 1 to 3 @nonterm{digit@sub{8}}s) where
each @nonterm{digit@sub{8}} is @litchar{0}, @litchar{1},
@ -409,7 +409,7 @@ Within a string sequence, the following escape sequences are
between 0 and 255 decimal, otherwise the
@exnraise[exn:fail:read].}
@item{@as-index{@litchar["\\x"]@kleenerange[1
@item{@as-index{@litchar{\x}@kleenerange[1
2]{@nonterm{digit@sub{16}}}}: Unicode for the hexadecimal
number specified by @kleenerange[1 2]{@nonterm{digit@sub{16}}},
where each @nonterm{digit@sub{16}} is @litchar{0}, @litchar{1},
@ -419,21 +419,21 @@ Within a string sequence, the following escape sequences are
@litchar{e}, or @litchar{f} (case-insensitive). The longer form
takes precedence over the shorter form.}
@item{@as-index{@litchar["\\u"]@kleenerange[1
4]{@nonterm{digit@sub{16}}}}: like @litchar["\\x"], but with up
@item{@as-index{@litchar{\u}@kleenerange[1
4]{@nonterm{digit@sub{16}}}}: like @litchar{\x}, but with up
to four hexadecimal digits (longer sequences take precedence).
The resulting hexadecimal number must be a valid argument to
@scheme[integer->char], otherwise the
@exnraise[exn:fail:read].}
@item{@as-index{@litchar["\\U"]@kleenerange[1
8]{@nonterm{digit@sub{16}}}}: like @litchar["\\x"], but with up
@item{@as-index{@litchar{\U}@kleenerange[1
8]{@nonterm{digit@sub{16}}}}: like @litchar{\x}, but with up
to eight hexadecimal digits (longer sequences take precedence).
The resulting hexadecimal number must be a valid argument to
@scheme[integer->char], otherwise the
@exnraise[exn:fail:read].}
@item{@as-index{@litchar["\\"]@nonterm{newline}}: elided, where
@item{@as-index{@litchar{\}@nonterm{newline}}: elided, where
@nonterm{newline} is either a linefeed, carriage return, or
carriage return--linefeed combination. This convetion allows
single-line strings to span multiple lines in the source.}
@ -451,7 +451,7 @@ A string constant preceded by @litchar{#} is parsed as a
byte-string. (That is, @as-index{@litchar{#"}} starts a byte-string
literal.) See @secref["bytestrings"] for information on byte
strings. Byte string constants support the same escape sequences as
character strings, except @litchar["\\u"] and @litchar["\\U"].
character strings, except @litchar{\u} and @litchar{\U}.
When the reader encounters @as-index{@litchar{#<<}}, it starts parsing a
@pidefterm{here string}. The characters following @litchar{#<<} until
@ -513,10 +513,10 @@ next linefeed (ASCII 10), carriage return (ASCII 13), next-line
(Unicode @scheme[#x0085]), line-separator (Unicode @scheme[#x2028]),
or line-separator (Uunicode @scheme[#x2028]) character.
A @as-index{@litchar["#|"]} starts a nestable block comment. When the
reader encounters @litchar["#|"], then it skips past all characters
until a closing @litchar["|#"]. Pairs of matching @litchar["#|"] and
@litchar["|#"] can be nested.
A @as-index{@litchar{#|}} starts a nestable block comment. When the
reader encounters @litchar{#|}, then it skips past all characters
until a closing @litchar{|#}. Pairs of matching @litchar{#|} and
@litchar{|#} can be nested.
A @as-index{@litchar{#;}} starts an S-expression comment. Then the
reader encounters @litchar{#;}, it recursively reads one datum, and
@ -525,7 +525,7 @@ result).
A @as-index{@litchar{#! }} (which is @litchar{#!} followed by a space)
or @as-index{@litchar{#!/}} starts a line comment that can be
continued to the next line by ending a line with @litchar["\\"]. This
continued to the next line by ending a line with @litchar{\}. This
form of comment normally appears at the beginning of a Unix script
file.
@ -552,7 +552,7 @@ lists (see @secref["parse-pair"]). A delimited @litchar{.} is not
allowed among the vector elements.
An optional vector length can be specified between the @litchar{#} and
@litchar["("], @litchar["["], or @litchar["{"]. The size is specified
@litchar{(}, @litchar{[}, or @litchar["{"]. The size is specified
using a sequence of decimal digits, and the number of elements
provided for the vector must be no more than the specified size. If
fewer elements are provided, the last provided element is used for the
@ -648,39 +648,39 @@ content is also wraped as a syntax object, and the box is immutable.
@guideintro["characters"]{the syntax of characters}
A @as-index{@litchar["#\\"]} starts a character constant, which has
A @as-index{@litchar{#\}} starts a character constant, which has
one of the following forms:
@itemize{
@item{ @litchar["#\\nul"] or @litchar["#\\null"]: NUL (ASCII 0)@nonalpha[]}
@item{ @litchar["#\\backspace"]: backspace (ASCII 8)@nonalpha[]}
@item{ @litchar["#\\tab"]: tab (ASCII 9)@nonalpha[]}
@item{ @litchar["#\\newline"] or @litchar["#\\linefeed"]: linefeed (ASCII 10)@nonalpha[]}
@item{ @litchar["#\\vtab"]: vertical tab (ASCII 11)@nonalpha[]}
@item{ @litchar["#\\page"]: page break (ASCII 12)@nonalpha[]}
@item{ @litchar["#\\return"]: carriage return (ASCII 13)@nonalpha[]}
@item{ @litchar["#\\space"]: space (ASCII 32)@nonalpha[]}
@item{ @litchar["#\\rubout"]: delete (ASCII 127)@nonalpha[]}
@item{ @litchar{#\nul} or @litchar{#\null}: NUL (ASCII 0)@nonalpha[]}
@item{ @litchar{#\backspace}: backspace (ASCII 8)@nonalpha[]}
@item{ @litchar{#\tab}: tab (ASCII 9)@nonalpha[]}
@item{ @litchar{#\newline} or @litchar{#\linefeed}: linefeed (ASCII 10)@nonalpha[]}
@item{ @litchar{#\vtab}: vertical tab (ASCII 11)@nonalpha[]}
@item{ @litchar{#\page}: page break (ASCII 12)@nonalpha[]}
@item{ @litchar{#\return}: carriage return (ASCII 13)@nonalpha[]}
@item{ @litchar{#\space}: space (ASCII 32)@nonalpha[]}
@item{ @litchar{#\rubout}: delete (ASCII 127)@nonalpha[]}
@item{@litchar["#\\"]@kleenerange[1 3]{@nonterm{digit@sub{8}}}:
@item{@litchar{#\}@kleenerange[1 3]{@nonterm{digit@sub{8}}}:
Unicode for the octal number specified by @kleenerange[1
3]{@nonterm{digit@sub{8}}}, as in string escapes (see
@secref["parse-string"]).}
@item{@litchar["#\\x"]@kleenerange[1 2]{@nonterm{digit@sub{16}}}:
@item{@litchar{#\x}@kleenerange[1 2]{@nonterm{digit@sub{16}}}:
Unicode for the hexadecimal number specified by @kleenerange[1
2]{@nonterm{digit@sub{16}}}, as in string escapes (see
@secref["parse-string"]).}
@item{@litchar["#\\u"]@kleenerange[1 4]{@nonterm{digit@sub{16}}}:
like @litchar["#\\x"], but with up to four hexadecimal digits.}
@item{@litchar{#\u}@kleenerange[1 4]{@nonterm{digit@sub{16}}}:
like @litchar{#\x}, but with up to four hexadecimal digits.}
@item{@litchar["#\\U"]@kleenerange[1 6]{@nonterm{digit@sub{16}}}:
like @litchar["#\\x"], but with up to six hexadecimal digits.}
@item{@litchar{#\U}@kleenerange[1 6]{@nonterm{digit@sub{16}}}:
like @litchar{#\x}, but with up to six hexadecimal digits.}
@item{@litchar["#\\"]@nonterm{c}: the character @nonterm{c}, as long
as @litchar["#\\"]@nonterm{c} and the characters following it
@item{@litchar{#\}@nonterm{c}: the character @nonterm{c}, as long
as @litchar{#\}@nonterm{c} and the characters following it
do not match any of the previous cases, and as long as the
character after @nonterm{c} is not
@schemelink[char-alphabetic?]{alphabetic}.}
@ -804,8 +804,8 @@ of alphanumeric ASCII, @litchar{+}, @litchar{-}, @litchar{_}, and/or
@litchar{/} characters terminated by
@schemelink[char-whitespace?]{whitespace} or an end-of-file. The
sequence must not start or end with @litchar{/}. A sequence
@litchar["#lang\u20"]@nonterm{name} is equivalent to
@litchar["#reader\u20"]@nonterm{name}@litchar{/lang/reader}, except
@litchar{#lang }@nonterm{name} is equivalent to
@litchar{#reader }@nonterm{name}@litchar{/lang/reader}, except
that the terminating whitespace (if any) is consumed before the
external reading procedure is called.

View File

@ -44,9 +44,9 @@ characters or 5,000 operators.
The following syntax specifications describe the content of a string
that represents a regular expression. The syntax of the corresponding
string may involve extra escape characters. For example, the regular
expression @litchar["(.*)\\1"] can be represented with the string
expression @litchar{(.*)\1} can be represented with the string
@scheme["(.*)\\1"] or the regexp constant @scheme[#rx"(.*)\\1"]; the
@litchar["\\"] in the regular expression must be escaped to include it
@litchar{\} in the regular expression must be escaped to include it
in a string or regexp constant.
The @scheme[regexp] and @scheme[pregexp] syntaxes share a common core:
@ -54,15 +54,15 @@ The @scheme[regexp] and @scheme[pregexp] syntaxes share a common core:
@common-table
The following completes the grammar for @scheme[regexp], which treats
@litchar["{"] and @litchar["}"] as literals, @litchar["\\"] as a
literal within ranges, and @litchar["\\"] as a literal producer
@litchar["{"] and @litchar["}"] as literals, @litchar{\} as a
literal within ranges, and @litchar{\} as a literal producer
outside of ranges.
@rx-table
The following completes the grammar for @scheme[pregexp], which uses
@litchar["{"] and @litchar["}"] bounded repetition and uses
@litchar["\\"] for meta-characters both inside and outside of ranges.
@litchar{\} for meta-characters both inside and outside of ranges.
@px-table
@ -89,7 +89,7 @@ matches between @math{n} and @math{m} characters. In the rule for
@litchar{(}@nonterm{Regexp}@litchar{)}, @math{N} means the number such
that the opening parenthesis is the @math{N}th opening parenthesis for
collecting match reports. Non-emptiness is inferred for a
backreference pattern, @litchar["\\"]@nonterm{N}, so that a
backreference pattern, @litchar{\}@nonterm{N}, so that a
backreference can be used for repetition patterns; in the case of
mutual dependencies among backreferences, the inference chooses the
fixpoint that maximizes non-emptiness. Finiteness is not inferred for
@ -251,7 +251,7 @@ contains parenthesized sub-expressions (but not when the open
parenthesis is followed by @litchar{?:}). Matches for the
sub-expressions are provided in the order of the opening parentheses
in @scheme[pattern]. When sub-expressions occur in branches of an
@litchar["|"] ``or'' pattern, in a @litchar{*} ``zero or more''
@litchar{|} ``or'' pattern, in a @litchar{*} ``zero or more''
pattern, or other places where the overall pattern can succeed without
a match for the sub-expression, then a @scheme[#f] is returned for the
sub-expression if it did not contribute to the final match. When a
@ -578,31 +578,31 @@ then @scheme[insert] as a string is converted to a byte string,
@scheme[insert] as a procedure is called with a byte string, and the
result is a byte string.
If @scheme[insert] contains @litchar["&"], then @litchar["&"]
If @scheme[insert] contains @litchar{&}, then @litchar{&}
is replaced with the matching portion of @scheme[input] before it is
substituted into the match's place. If @scheme[insert] contains
@litchar["\\"]@nonterm{n} for some integer @nonterm{n}, then it is
@litchar{\}@nonterm{n} for some integer @nonterm{n}, then it is
replaced with the @nonterm{n}th matching sub-expression from
@scheme[input]. A @litchar{&} and @litchar["\\0"] are synonymous. If
@scheme[input]. A @litchar{&} and @litchar{\0} are synonymous. If
the @nonterm{n}th sub-expression was not used in the match, or if
@nonterm{n} is greater than the number of sub-expressions in
@scheme[pattern], then @litchar["\\"]@nonterm{n} is replaced with the
@scheme[pattern], then @litchar{\}@nonterm{n} is replaced with the
empty string.
To substitute a literal @litchar{&} or @litchar["\\"], use
@litchar["\\&"] and @litchar["\\\\"], respectively, in
@scheme[insert]. A @litchar["\\$"] in @scheme[insert] is
To substitute a literal @litchar{&} or @litchar{\}, use
@litchar{\&} and @litchar{\\}, respectively, in
@scheme[insert]. A @litchar{\$} in @scheme[insert] is
equivalent to an empty sequence; this can be used to terminate a
number @nonterm{n} following @litchar["\\"]. If a @litchar["\\"] in
number @nonterm{n} following @litchar{\}. If a @litchar{\} in
@scheme[insert] is followed by anything other than a digit,
@litchar{&}, @litchar["\\"], or @litchar{$}, then the @litchar["\\"]
by itself is treated as @litchar["\\0"].
@litchar{&}, @litchar{\}, or @litchar{$}, then the @litchar{\}
by itself is treated as @litchar{\0}.
Note that the @litchar["\\"] described in the previous paragraphs is a
Note that the @litchar{\} described in the previous paragraphs is a
character or byte of @scheme[input]. To write such an @scheme[input]
as a Scheme string literal, an escaping @litchar["\\"] is needed
before the @litchar["\\"]. For example, the Scheme constant
@scheme["\\1"] is @litchar["\\1"].
as a Scheme string literal, an escaping @litchar{\} is needed
before the @litchar{\}. For example, the Scheme constant
@scheme["\\1"] is @litchar{\1}.
@examples[
(regexp-replace "mi" "mi casa" "su")
@ -645,8 +645,8 @@ recursively. Zero-length matches are treated the same as in
Produces a string suitable for use as the third argument to
@scheme[regexp-replace] to insert the literal sequence of characters
in @scheme[str] or bytes in @scheme[bstr] as a replacement.
Concretely, every @litchar["\\"] and @litchar{&} in @scheme[str] or
@scheme[bstr] is protected by a quoting @litchar["\\"].
Concretely, every @litchar{\} and @litchar{&} in @scheme[str] or
@scheme[bstr] is protected by a quoting @litchar{\}.
@examples[
(regexp-replace "UT" "Go UT!" "A&M")

View File

@ -11,7 +11,7 @@ marshaled to a byte string.
In @scheme[read-syntax], the reader attaches a @scheme['paren-shape]
property to any pair or vector syntax object generated from parsing a
pair @litchar["["] and @litchar["]"] or @litchar["{"] and
pair @litchar{[} and @litchar{]} or @litchar["{"] and
@litchar["}"]; the property value is @scheme[#\[] in the former case,
and @scheme[#\{] in the latter case. The @scheme[syntax] form copies
any @scheme['paren-shape] property from the source of a template to

View File

@ -9,16 +9,16 @@
In general, a Windows pathname consists of an optional drive specifier
and a drive-specific path. A Windows path can be @defterm{absolute}
but still relative to the current drive; such paths start with a
@litchar{/} or @litchar["\\"] separator and are not UNC paths or paths
that start with @litchar["\\\\?\\"].
@litchar{/} or @litchar{\} separator and are not UNC paths or paths
that start with @litchar{\\?\}.
A path that starts with a drive specification is @defterm{complete}.
Roughly, a drive specification is either a Roman letter followed by a
colon, a UNC path of the form
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}, or a
@litchar["\\\\?\\"] form followed by something other than
@litchar["REL\\"]@nonterm{element}, or
@litchar["RED\\"]@nonterm{element}. (Variants of @litchar["\\\\?\\"]
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}, or a
@litchar{\\?\} form followed by something other than
@litchar{REL\}@nonterm{element}, or
@litchar{RED\}@nonterm{element}. (Variants of @litchar{\\?\}
paths are described further below.)
Scheme fails to implement the usual Windows path syntax in one
@ -35,36 +35,36 @@ parameter). Consequently, Scheme implicitly converts a path like
@item{@|MzAdd| Whenever a path starts with a drive specifier
@nonterm{letter}@litchar{:} that is not followed by a
@litchar{/} or @litchar["\\"], a @litchar["\\"] is inserted as
@litchar{/} or @litchar{\}, a @litchar{\} is inserted as
the path is @tech{cleanse}d.}
}
Otherwise, Scheme follows standard Windows path conventions, but also
adds @litchar["\\\\?\\REL"] and @litchar["\\\\?\\RED"] conventions to
adds @litchar{\\?\REL} and @litchar{\\?\RED} conventions to
deal with paths inexpressible in the standard conventsion, plus
conventions to deal with excessive @litchar["\\"]s in @litchar["\\\\?\\"]
conventions to deal with excessive @litchar{\}s in @litchar{\\?\}
paths.
In the following, @nonterm{letter} stands for a Roman letter (case
does not matter), @nonterm{machine} stands for any sequence of
characters that does not include @litchar["\\"] or @litchar{/} and is
characters that does not include @litchar{\} or @litchar{/} and is
not @litchar{?}, @nonterm{volume} stands for any sequence of
characters that does not include @litchar["\\"] or @litchar{/} , and
characters that does not include @litchar{\} or @litchar{/} , and
@nonterm{element} stands for any sequence of characters that does not
include @litchar["\\"].
include @litchar{\}.
@itemize{
@item{Trailing spaces and @litchar{.} in a path element are ignored
when the element is the last one in the path, unless the path
starts with @litchar["\\\\?\\"] or the element consists of only
starts with @litchar{\\?\} or the element consists of only
spaces and @litchar{.}s.}
@item{The following special ``files'', which access devices, exist in
all directories, case-insensitively, and with all possible
endings after a period or colon, except in pathnames that start
with @litchar["\\\\?\\"]: @indexed-file{NUL}, @indexed-file{CON},
with @litchar{\\?\}: @indexed-file{NUL}, @indexed-file{CON},
@indexed-file{PRN}, @indexed-file{AUX}, @indexed-file{COM1},
@indexed-file{COM2}, @indexed-file{COM3}, @indexed-file{COM4},
@indexed-file{COM5}, @indexed-file{COM6}, @indexed-file{COM7},
@ -73,116 +73,116 @@ include @litchar["\\"].
@indexed-file{LPT5}, @indexed-file{LPT6}, @indexed-file{LPT7},
@indexed-file{LPT8}, @indexed-file{LPT9}.}
@item{Except for @litchar["\\\\?\\"] paths, @litchar{/}s are
equivalent to @litchar["\\"]s. Except for @litchar["\\\\?\\"]
@item{Except for @litchar{\\?\} paths, @litchar{/}s are
equivalent to @litchar{\}s. Except for @litchar{\\?\}
paths and the start of UNC paths, multiple adjacent
@litchar{/}s and @litchar["\\"]s count as a single
@litchar["\\"]. In a path that starts @litchar["\\\\?\\"]
@litchar{/}s and @litchar{\}s count as a single
@litchar{\}. In a path that starts @litchar{\\?\}
paths, elements can be separated by either a single or double
@litchar["\\"].}
@litchar{\}.}
@item{A directory can be accessed with or without a trailing
separator. In the case of a non-@litchar["\\\\?\\"] path, the
separator. In the case of a non-@litchar{\\?\} path, the
trailing separator can be any number of @litchar{/}s and
@litchar["\\"]s; in the case of a @litchar["\\\\?\\"] path, a
trailing separator must be a single @litchar["\\"], except that
two @litchar["\\"]s can follow
@litchar["\\\\?\\"]@nonterm{letter}@litchar{:}.}
@litchar{\}s; in the case of a @litchar{\\?\} path, a
trailing separator must be a single @litchar{\}, except that
two @litchar{\}s can follow
@litchar{\\?\}@nonterm{letter}@litchar{:}.}
@item{Except for @litchar["\\\\?\\"] paths, a single @litchar{.} as a
@item{Except for @litchar{\\?\} paths, a single @litchar{.} as a
path element means ``the current directory,'' and a
@litchar{..} as a path element means ``the parent directory.''
Up-directory path elements (i.e., @litchar{..}) immediately
after a drive are ignored.}
@item{A pathname that starts
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
(where a @litchar{/} can replace any @litchar["\\"]) is a UNC
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}
(where a @litchar{/} can replace any @litchar{\}) is a UNC
path, and the starting
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}
counts as the drive specifier.}
@item{Normally, a path element cannot contain any of the following
characters:
@centerline{@litchar{<} @litchar{>} @litchar{:} @litchar{"} @litchar{/} @litchar["\\"] @litchar["|"]}
@centerline{@litchar{<} @litchar{>} @litchar{:} @litchar{"} @litchar{/} @litchar{\} @litchar{|}}
Except for @litchar["\\"], path elements containing these
characters can be accessed using a @litchar["\\\\?\\"] path
Except for @litchar{\}, path elements containing these
characters can be accessed using a @litchar{\\?\} path
(assuming that the underlying filesystem allows the
characters).}
@item{In a pathname that starts
@litchar["\\\\?\\"]@nonterm{letter}@litchar[":\\"], the
@litchar["\\\\?\\"]@nonterm{letter}@litchar[":\\"] prefix
@litchar{\\?\}@nonterm{letter}@litchar{:\}, the
@litchar{\\?\}@nonterm{letter}@litchar{:\} prefix
counts as the path's drive, as long as the path does not both
contain non-drive elements and end with two consecutive
@litchar["\\"]s, and as long as the path contains no sequence
of three or more @litchar["\\"]s. Two @litchar["\\"]s can
appear in place of the @litchar["\\"] before
@litchar{\}s, and as long as the path contains no sequence
of three or more @litchar{\}s. Two @litchar{\}s can
appear in place of the @litchar{\} before
@nonterm{letter}. A @litchar{/} cannot be used in place of a
@litchar["\\"] (but @litchar{/}s can be used in element names,
@litchar{\} (but @litchar{/}s can be used in element names,
though the result typically does not name an actual directory
or file).}
@item{In a pathname that starts
@litchar["\\\\?\\UNC\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume},
@litchar{\\?\UNC\}@nonterm{machine}@litchar{\}@nonterm{volume},
the
@litchar["\\\\?\\UNC\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
@litchar{\\?\UNC\}@nonterm{machine}@litchar{\}@nonterm{volume}
prefix counts as the path's drive, as long as the path does
not end with two consecutive @litchar["\\"]s, and as long as
not end with two consecutive @litchar{\}s, and as long as
the path contains no sequence of three or more
@litchar["\\"]s. Two @litchar["\\"]s can appear in place of
the @litchar["\\"] before @litchar{UNC}, the @litchar["\\"]s
after @litchar{UNC}, and/or the @litchar["\\"]s
@litchar{\}s. Two @litchar{\}s can appear in place of
the @litchar{\} before @litchar{UNC}, the @litchar{\}s
after @litchar{UNC}, and/or the @litchar{\}s
after@nonterm{machine}. The letters in the @litchar{UNC} part
can be uppercase or lowercase, and @litchar{/} cannot be used
in place of @litchar["\\"]s (but @litchar{/} can be used in
in place of @litchar{\}s (but @litchar{/} can be used in
element names).}
@item{@|MzAdd| A pathname that starts
@litchar["\\\\?\\REL\\"]@nonterm{element} or
@litchar["\\\\?\\REL\\\\"]@nonterm{element} is a relative
@litchar{\\?\REL\}@nonterm{element} or
@litchar{\\?\REL\\}@nonterm{element} is a relative
path, as long as the path does not end with two consecutive
@litchar["\\"]s, and as long as the path contains no sequence of
three or more @litchar["\\"]s. This Scheme-specific path form
@litchar{\}s, and as long as the path contains no sequence of
three or more @litchar{\}s. This Scheme-specific path form
supports relative paths with elements that are not normally
expressible in Windows paths (e.g., a final element that ends
in a space). The @litchar{REL} part must be exactly the three
uppercase letters, and @litchar{/}s cannot be used in place
of @litchar["\\"]s. If the path starts
@litchar["\\\\?\\REL\\.."] then for as long as the
path continues with repetitions of @litchar["\\.."],
of @litchar{\}s. If the path starts
@litchar{\\?\REL\..} then for as long as the
path continues with repetitions of @litchar{\..},
each element counts as an up-directory element; a single
@litchar["\\"] must be used to separate the up-directory
elements. As soon as a second @litchar["\\"] is used to separate
@litchar{\} must be used to separate the up-directory
elements. As soon as a second @litchar{\} is used to separate
the elements, or as soon as a non-@litchar{..} element is
encountered, the remaining elements are all literals (never
up-directory elements). When a @litchar["\\\\?\\REL"] path
up-directory elements). When a @litchar{\\?\REL} path
value is converted to a string (or when the path value is
written or displayed), the string does not contain the
starting @litchar["\\\\?\\REL"] or the immediately following
@litchar["\\"]s; converting a path value to a byte string
preserves the @litchar["\\\\?\\REL"] prefix.}
starting @litchar{\\?\REL} or the immediately following
@litchar{\}s; converting a path value to a byte string
preserves the @litchar{\\?\REL} prefix.}
@item{@|MzAdd| A pathname that starts
@litchar["\\\\?\\RED\\"]@nonterm{element} or
@litchar["\\\\?\\RED\\\\"]@nonterm{element} is a
@litchar{\\?\RED\}@nonterm{element} or
@litchar{\\?\RED\\}@nonterm{element} is a
drive-relative path, as long as the path does not end with two
consecutive @litchar["\\"]s, and as long as the path contains
no sequence of three or more @litchar["\\"]s. This
consecutive @litchar{\}s, and as long as the path contains
no sequence of three or more @litchar{\}s. This
Scheme-specific path form supports drive-relative paths (i.e.,
absolute given a drive) with elements that are not normally
expressible in Windows paths. The @litchar{RED} part must be
exactly the three uppercase letters, and @litchar{/}s cannot
be used in place of @litchar["\\"]s. Unlike
@litchar["\\\\?\\REL"] paths, a @litchar{..} element is always
a literal path element. When a @litchar["\\\\?\\RED"] path
be used in place of @litchar{\}s. Unlike
@litchar{\\?\REL} paths, a @litchar{..} element is always
a literal path element. When a @litchar{\\?\RED} path
value is converted to a string (or when the path value is
written or displayed), the string does not contain the
starting @litchar["\\\\?\\RED"] and it contains a single
starting @litchar["\\"]; converting a path value to a byte
string preserves the @litchar["\\\\?\\RED"] prefix.}
starting @litchar{\\?\RED} and it contains a single
starting @litchar{\}; converting a path value to a byte
string preserves the @litchar{\\?\RED} prefix.}
}
@ -192,33 +192,33 @@ sequences that are otherwise ill-formed as Windows paths:
@itemize{
@item{@|MzAdd| In a pathname of the form
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\"] where
@litchar{\\?\}@nonterm{any}@litchar{\\} where
@nonterm{any} is any non-empty sequence of characters other
than @nonterm{letter}@litchar{:} or
@litchar["\\"]@nonterm{letter}@litchar{:}, the entire path
@litchar{\}@nonterm{letter}@litchar{:}, the entire path
counts as the path's (non-existent) drive.}
@item{@|MzAdd| In a pathname of the form
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\\\"]@nonterm{elements},
@litchar{\\?\}@nonterm{any}@litchar{\\\}@nonterm{elements},
where @nonterm{any} is any non-empty sequence of characters
and @nonterm{elements} is any sequence that does not start
with a @litchar["\\"], does not end with two @litchar["\\"]s,
and does not contain a sequence of three @litchar["\\"]s, then
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\"] counts as the
with a @litchar{\}, does not end with two @litchar{\}s,
and does not contain a sequence of three @litchar{\}s, then
@litchar{\\?\}@nonterm{any}@litchar{\\} counts as the
path's (non-existent) drive.}
@item{@|MzAdd| In a pathname that starts @litchar["\\\\?\\"] and
@item{@|MzAdd| In a pathname that starts @litchar{\\?\} and
does not match any of the patterns from the preceding bullets,
@litchar["\\\\?\\"] counts as the path's (non-existent)
@litchar{\\?\} counts as the path's (non-existent)
drive.}
}
Outside of Scheme, except for @litchar["\\\\?\\"] paths, pathnames are
Outside of Scheme, except for @litchar{\\?\} paths, pathnames are
typically limited to 259 characters. Scheme internally converts
pathnames to @litchar["\\\\?\\"] form as needed to avoid this
pathnames to @litchar{\\?\} form as needed to avoid this
limit. The operating system cannot access files through
@litchar["\\\\?\\"] paths that are longer than 32,000 characters or
@litchar{\\?\} paths that are longer than 32,000 characters or
so.
Where the above descriptions says ``character,'' substitute ``byte''
@ -226,22 +226,22 @@ for interpreting byte strings as paths. The encoding of Windows paths
into bytes preserves ASCII characters, and all special characters
mentioned above are ASCII, so all of the rules are the same.
Beware that the @litchar["\\"] path separator is an escape character
in Scheme strings. Thus, the path @litchar["\\\\?\\REL\\..\\\\.."] as
Beware that the @litchar{\} path separator is an escape character
in Scheme strings. Thus, the path @litchar{\\?\REL\..\\..} as
a string must be written @scheme["\\\\?\\REL\\..\\\\.."].
A path that ends with a directory separator syntactically refers to a
directory. In addition, a path syntactcially refers to a directory if
its last element is a same-directory or up-directory indicator (not
quoted by a @litchar["\\\\?\\"] form), or if it refers to a root.
quoted by a @litchar{\\?\} form), or if it refers to a root.
Windows paths are @techlink{cleanse}d as follows: In paths that start
@litchar["\\\\?\\"], redundant @litchar["\\"]s are removed, an extra
@litchar["\\"] is added in a @litchar["\\\\?\\REL"] if an extra one is
@litchar{\\?\}, redundant @litchar{\}s are removed, an extra
@litchar{\} is added in a @litchar{\\?\REL} if an extra one is
not already present to separate up-directory indicators from literal
path elements, and an extra @litchar["\\"] is similarly added after
@litchar["\\\\?\\RED"] if an extra one is not already present. When
@litchar["\\\\?\\"] acts as the root and the path contains, to
path elements, and an extra @litchar{\} is similarly added after
@litchar{\\?\RED} if an extra one is not already present. When
@litchar{\\?\} acts as the root and the path contains, to
additional @litchar{/}s (which might otherwise be redundant) are
included after the root. For other paths, multiple @litchar{/}s are
converted to single @litchar{/}s (except at the beginning of a shared
@ -251,35 +251,35 @@ specification if it is missing.
For @scheme[(bytes->path-element _bstr)], @litchar{/}s, colons,
trailing dots, trailing whitespace, and special device names (e.g.,
``aux'') in @scheme[_bstr] are encoded as a literal part of the path
element by using a @litchar["\\\\?\\REL"] prefix. The @scheme[bstr]
argument must not contain a @litchar["\\"], otherwise the
element by using a @litchar{\\?\REL} prefix. The @scheme[bstr]
argument must not contain a @litchar{\}, otherwise the
@exnraise[exn:fail:contract].
For @scheme[(path-element->bytes _path)] or
@scheme[(path-element->string _path)], if the byte-string form of
@scheme[_path] starts with a @litchar["\\\\?\\REL"], the prefix is not
@scheme[_path] starts with a @litchar{\\?\REL}, the prefix is not
included in the result.
For @scheme[(build-path _base-path _sub-path ...)], trailing spaces
and periods are removed from the last element of @scheme[_base-path]
and all but the last @scheme[_sub-path] (unless the element consists of
only spaces and peroids), except for those that start with
@litchar["\\\\?\\"]. If @scheme[_base-path] starts @litchar["\\\\?\\"],
then after each non-@litchar["\\\\?\\REL\\"] and
non-@litchar["\\\\?\\RED\\"] @scheme[_sub-path] is added, all
@litchar{/}s in the addition are converted to @litchar["\\"]s,
multiple consecutive @litchar["\\"]s are converted to a single
@litchar["\\"], added @litchar{.} elements are removed, and added
@litchar{\\?\}. If @scheme[_base-path] starts @litchar{\\?\},
then after each non-@litchar{\\?\REL\} and
non-@litchar{\\?\RED\} @scheme[_sub-path] is added, all
@litchar{/}s in the addition are converted to @litchar{\}s,
multiple consecutive @litchar{\}s are converted to a single
@litchar{\}, added @litchar{.} elements are removed, and added
@litchar{..} elements are removed along with the preceding element;
these conversions are not performed on the original @scheme[_base-path]
part of the result or on any @litchar["\\\\?\\REL\\"] or
@litchar["\\\\?\\RED\\"] or @scheme[_sub-path]. If a
@litchar["\\\\?\\REL\\"] or @litchar["\\\\?\\RED\\"]
@scheme[_sub-path] is added to a non-@litchar["\\\\?\\"]
part of the result or on any @litchar{\\?\REL\} or
@litchar{\\?\RED\} or @scheme[_sub-path]. If a
@litchar{\\?\REL\} or @litchar{\\?\RED\}
@scheme[_sub-path] is added to a non-@litchar{\\?\}
@scheme[_base-path], the the @scheme[_base-path] (with any additions up
to the @litchar["\\\\?\\REL\\"] or @litchar["\\\\?\\RED\\"]
to the @litchar{\\?\REL\} or @litchar{\\?\RED\}
@scheme[_sub-path]) is simplified and converted to a
@litchar["\\\\?\\"] path. In other cases, a @litchar["\\"] may be
@litchar{\\?\} path. In other cases, a @litchar{\} may be
added or removed before combining paths to avoid changing the root
meaning of the path (e.g., combining @litchar{//x} and @litchar{y}
produces @litchar{/x/y}, because @litchar{//x/y} would be a UNC path
@ -287,18 +287,18 @@ instead of a drive-relative path).
For @scheme[(simplify-path _path _use-filesystem?)], @scheme[_path] is
expanded, and if @scheme[_path] does not start with
@litchar["\\\\?\\"], trailing spaces and periods are removed, a
@litchar{\\?\}, trailing spaces and periods are removed, a
@litchar{/} is inserted after the colon in a drive specification if it
is missing, and a @litchar["\\"] is inserted after @litchar["\\\\?\\"]
as a root if there are elements and no extra @litchar["\\"]
is missing, and a @litchar{\} is inserted after @litchar{\\?\}
as a root if there are elements and no extra @litchar{\}
already. Otherwise, if no indicators or redundant separators are in
@scheme[_path], then @scheme[_path] is returned.
For @scheme[(split-path _path)] producing @scheme[_base],
@scheme[_name], and @scheme[_must-be-dir?], splitting a path that does
not start with @litchar["\\\\?\\"] can produce parts that start with
@litchar["\\\\?\\"]. For example, splitting @litchar{C:/x~/aux/}
produces @litchar["\\\\?\\C:\\x~\\"] and @litchar["\\\\?\\REL\\\\aux"];
the @litchar["\\\\?\\"] is needed in these cases to preserve a
not start with @litchar{\\?\} can produce parts that start with
@litchar{\\?\}. For example, splitting @litchar{C:/x~/aux/}
produces @litchar{\\?\C:\x~\} and @litchar{\\?\REL\\aux};
the @litchar{\\?\} is needed in these cases to preserve a
trailing space after @litchar{x} and to avoid referring to the AUX
device instead of an @filepath{aux} file.

View File

@ -137,14 +137,14 @@ Formats to a string. The result is the same as
A parameter that control pair printing. If the value is true, then
pairs print using @litchar["{"] and @litchar["}"] instead of
@litchar["("] and @litchar[")"]. The default is @scheme[#f].}
@litchar{(} and @litchar{)}. The default is @scheme[#f].}
@defboolparam[print-mpair-curly-braces on?]{
A parameter that control pair printing. If the value is true, then
mutable pairs print using @litchar["{"] and @litchar["}"] instead of
@litchar["("] and @litchar[")"]. The default is @scheme[#t].}
@litchar{(} and @litchar{)}. The default is @scheme[#t].}
@defboolparam[print-unreadable on?]{

View File

@ -96,11 +96,11 @@ one must be present. No spaces are allowed between
@itemize{
@item{@litchar["@"] and @nonterm{cmd}, @litchar["["], or @litchar["{"]}
@item{@litchar["@"] and @nonterm{cmd}, @litchar{[}, or @litchar["{"]}
@item{@nonterm{cmd} and @litchar["["] or @litchar["{"]; or}
@item{@nonterm{cmd} and @litchar{[} or @litchar["{"]; or}
@item{@litchar["]"] and @litchar["{"].}
@item{@litchar{]} and @litchar["{"].}
}
@ -113,7 +113,7 @@ The expansion of @litchar["@"]@nonterm{cmd} into Scheme code is
#, @nonterm{cmd}
]
When either @litchar["["] @litchar["]"] or @litchar["{"] @litchar["}"]
When either @litchar{[} @litchar{]} or @litchar["{"] @litchar["}"]
are used, the expansion is
@schemeblock[
@ -128,8 +128,8 @@ In practice, the @nonterm{cmd} is normally a Scheme identifier that is
bound to a procedure or syntactic form. If the procedure or form
expects further text to typeset, then @litchar["{"] @litchar["}"]
supplies the text. If the form expects other data, typically
@litchar["["] @litchar["]"] is used to surround Scheme arguments,
instead. Sometimes, both @litchar["["] @litchar["]"] and @litchar["{"]
@litchar{[} @litchar{]} is used to surround Scheme arguments,
instead. Sometimes, both @litchar{[} @litchar{]} and @litchar["{"]
@litchar["}"] are used, where the former surround Scheme arguments
that precede text to typeset.

View File

@ -101,7 +101,7 @@ to @scheme["\n"] expressions.
blah}
}===|
Note that spaces are not allowed before a @litchar["["] or a
Note that spaces are not allowed before a @litchar{[} or a
@litchar["{"], or they will be part of the following text (or Scheme
code). (More on using braces in body texts below.)
@ -150,9 +150,9 @@ wrapping the @italic{whole} expression.
@`',@foo{blah}
}===|
When writing Scheme code, this means that @litchar["@`',@foo{blah}"]
is exactly the same as @litchar["`@',@foo{blah}"] and
@litchar["`',@@foo{blah}"], but unlike the latter two, the first
When writing Scheme code, this means that @litchar|{@`',@foo{blah}}|
is exactly the same as @litchar|{`@',@foo{blah}}| and
@litchar|{`',@@foo{blah}}|, but unlike the latter two, the first
construct can appear in body texts with the same meaning, whereas the
other two would not work (see below).
@ -190,7 +190,7 @@ In the first form, the commented body must still parse correctly; see
the description of the body syntax below. In the second form, all
text from the @litchar["@;"] to the end of the line @italic{and} all
following spaces (or tabs) are part of the comment (similar to
@litchar["%"] comments in TeX).
@litchar{%} comments in TeX).
@scribble-examples|==={
@foo{bar @; comment
@ -345,7 +345,7 @@ the opening marker to have the text terminated by a @litchar["}|"].
}===|
This applies to sub-@"@"-forms too---the @litchar["@"] must be
prefixed with a @litchar["|"]:
prefixed with a @litchar{|}:
@scribble-examples|==={
@foo|{Maze
@ -354,18 +354,18 @@ prefixed with a @litchar["|"]:
@t|{In |@i|{sub|@"@"s}| too}|
}===|
Note that the subform uses its own delimiters, @litchar["{...}"] or
@litchar["|{...}|"]. This means that you can copy and paste Scribble
Note that the subform uses its own delimiters, @litchar{{...}} or
@litchar{|{...}|}. This means that you can copy and paste Scribble
text with @"@"-forms freely, just prefix the @litchar["@"] if the
immediate surrounding text has a prefix.
For even better control, you can add characters in the opening
delimiter, between the @litchar["|"] and the @litchar["{"].
delimiter, between the @litchar{|} and the @litchar["{"].
Characters that are put there (non alphanumeric ASCII characters only,
excluding @litchar["{"] and @litchar["@"]) should also be used for
sub-@"@"-forms, and the end-of-body marker should have these characters
in reverse order with paren-like characters (@litchar["("],
@litchar["["], @litchar["<"]) mirrored.
in reverse order with paren-like characters (@litchar{(},
@litchar{[}, @litchar{<}) mirrored.
@scribble-examples|==={
@foo|<<<{@x{foo} |@{bar}|.}>>>|
@ -383,7 +383,7 @@ multi-line body texts.
In some cases, you may want to use a Scheme identifier (or a number or
a boolean etc.) in a position that touches the following text; in
these situations you should surround the escaped Scheme expression by
a pair of @litchar["|"] characters. The text inside the bars is
a pair of @litchar{|} characters. The text inside the bars is
parsed as a Scheme expression.
@scribble-examples|==={
@ -437,9 +437,9 @@ as the Scheme command part of a @"@"-form. The latter is used in this case
@;--------------------------------------------------------------------
@subsubsub*section{Comments}
As noted above, there are two kinds of Scribble comments: @litchar["@;{...}"] is
As noted above, there are two kinds of Scribble comments: @litchar|{@;{...}}| is
a (nestable) comment for a whole body of text (following the same
rules for @"@"-forms), and @litchar["@;..."] is a line-comment.
rules for @"@"-forms), and @litchar|{@;...}| is a line-comment.
@scribble-examples|==={
@foo{First line@;{there is still a
@ -534,7 +534,7 @@ indentation strings are added so the result has the same indentation.
A indentation string is added to each line according to its distance
from the leftmost syntax object (except for empty lines). (Note: if
you try these examples on a mzscheme REPL, you should be aware that
the reader does not know about the "@litchar["> "]" prompt.)
the reader does not know about the ``@litchar{> }'' prompt.)
@scribble-examples|==={
@foo{
@ -791,7 +791,7 @@ resulting reader in several ways:
readtable-to-readtable function that will construct one from the
@"@"-readtable. The idea is that you may want to have completely
different uses for the datum part, for example, introducing a
convenient @litchar["key=val"] syntax for attributes.}
convenient @litchar{key=val} syntax for attributes.}
@item{@scheme[syntax-post-proc] --- function that is applied on
each resulting syntax value after it has been parsed (but before it

View File

@ -117,9 +117,9 @@ widest line.
Each list within @scheme[element]s is spliced into the sequence of
string and pict elements. If @scheme[decode?] is true, then strings
among the @scheme[element]s are decoded by performing the following
substitutions: @litchar["---"] @d=> @litchar["\u2014"], @litchar["--"]
@d=> @litchar["\u2013"], @litchar["``"] @d=> @litchar["\u201C"],
@litchar["''"] @d=> @litchar["\u201D"], @litchar["'"] @d=>
substitutions: @litchar{---} @d=> @litchar["\u2014"], @litchar{--}
@d=> @litchar["\u2013"], @litchar{``} @d=> @litchar["\u201C"],
@litchar{''} @d=> @litchar["\u201D"], @litchar{'} @d=>
@litchar["\u2019"].
Strings are split at spaces for word-wrapping to fit the page, and a

View File

@ -166,8 +166,8 @@ provides the unit that actually implements a dispatching server.
@; XXX Talk about how threads and custodians are used.
@defthing[dispatch-server\@ (unit/c (tcp^ dispatch-server-config^)
(dispatch-server^))]{
@defthing[dispatch-server@ (unit/c (tcp^ dispatch-server-config^)
(dispatch-server^))]{
Runs the dispatching server config in a very basic way, except that it uses
@secref["connection-manager.ss"] to manage connections.
}

View File

@ -84,7 +84,7 @@ of the @web-server in other applications, or loading a custom
dispatcher. See @filepath{run.ss} for an example of such a script.
@defproc[(serve [#:dispatch dispatch dispatcher?]
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:port port integer? 80]
[#:listen-ip listen-ip (or/c string? false/c) #f]
[#:max-waiting max-waiting integer? 40]
@ -106,7 +106,7 @@ from a given path:
@schemeblock[
(define (start-file-server base)
(serve
(serve
#:dispatch
(files:make
#:url->path (make-url->path base)
@ -114,10 +114,10 @@ from a given path:
(lambda (path)
#"application/octet-stream"))
#:port 8080))
]
]
@defproc[(serve/ports [#:dispatch dispatch dispatcher?]
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:ports ports (listof integer?) (list 80)]
[#:listen-ip listen-ip (or/c string? false/c) #f]
[#:max-waiting max-waiting integer? 40]
@ -128,7 +128,7 @@ from a given path:
}
@defproc[(serve/ips+ports [#:dispatch dispatch dispatcher?]
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:ips+ports ips+ports (listof (cons/c (or/c string? false/c) (listof integer?))) (list (cons #f (list 80)))]
[#:max-waiting max-waiting integer? 40]
[#:initial-connection-timeout initial-connection-timeout integer? 60])

View File

@ -50,7 +50,7 @@ Provides contains the following identifiers.
@defmodule[web-server/web-config-unit]
@defproc[(configuration-table->web-config\@ [path path?]
@defproc[(configuration-table->web-config@ [path path?]
[#:port port (or/c false/c port-number?) #f]
[#:listen-ip listen-ip (or/c false/c string?) #f]
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
@ -59,7 +59,7 @@ Provides contains the following identifiers.
@scheme[configuration-table-sexpr->web-config@] appropriately.
}
@defproc[(configuration-table-sexpr->web-config\@ [sexpr list?]
@defproc[(configuration-table-sexpr->web-config@ [sexpr list?]
[#:web-server-root web-server-root path? (directory-part default-configuration-table-path)]
[#:port port (or/c false/c port-number?) #f]
[#:listen-ip listen-ip (or/c false/c string?) #f]

View File

@ -29,8 +29,8 @@ The @web-server offers a unit-based approach to running the server.
@defmodule[web-server/web-server-unit]
@defthing[web-server\@ (unit/c (web-config^ tcp^)
(web-server^))]{
@defthing[web-server@ (unit/c (web-config^ tcp^)
(web-server^))]{
Uses the @scheme[web-config^] to construct a @scheme[dispatcher?]
function that sets up one virtual host dispatcher, for each virtual