Skip to content

Commit f584d8f

Browse files
authored
Merge pull request #1495 from cgay/doc-linkification
Doc linkification and :macrocall: improvements
2 parents a368cd1 + b80c73e commit f584d8f

28 files changed

+532
-559
lines changed

documentation/library-reference/source/c-ffi/index.rst

+110-111
Large diffs are not rendered by default.

documentation/library-reference/source/collections/bit-set.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The bit-set Module
1313
:keyword all-members-from: If this is a non-negative integer then the set
1414
created will be infinite. All integers greater than
1515
or equal to the one supplied will be members of the
16-
set. The default is ``#f``.
16+
set. The default is :drm:`#f`.
1717
:keyword member-vector:
1818
:keyword members: If supplied, this gives the initial elements of the
1919
set as a sequence of integers.
@@ -67,7 +67,7 @@ The bit-set Module
6767

6868
:description:
6969

70-
Returns ``#t`` if the set is infinite, otherwise ``#f``.
70+
Returns :drm:`#t` if the set is infinite, otherwise :drm:`#f`.
7171

7272
.. generic-function:: member?
7373
:sealed:
@@ -80,7 +80,7 @@ The bit-set Module
8080

8181
:description:
8282

83-
Returns ``#t`` if ``element`` is a member of the set, otherwise ``#f``.
83+
Returns :drm:`#t` if ``element`` is a member of the set, otherwise :drm:`#f`.
8484
``element`` must be a non-negative integer.
8585

8686
.. generic-function:: set-add
@@ -260,11 +260,11 @@ The bit-set Module
260260
:signature: size *set* => *false-or-integer*
261261

262262
:parameter set: An instance of :class:`<bit-set>`.
263-
:value size: Either ``#f`` or an instance of :drm:`<integer>`.
263+
:value size: Either :drm:`#f` or an instance of :drm:`<integer>`.
264264

265265
:description:
266266

267-
Returns the cardinality of the set or ``#f`` if the set is
267+
Returns the cardinality of the set or :drm:`#f` if the set is
268268
infinite. This operation may be relatively slow.
269269

270270
.. function:: universal-bit-set!

documentation/library-reference/source/collections/plists.rst

+8-13
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ Reference
7979
Modify the *plist*, adding *indicator* with the given *value*.
8080

8181
:macrocall:
82-
.. code-block:: dylan
83-
84-
put-property!(*plist*, *indicator*, *value*)
82+
.. parsed-literal::
83+
put-property!(`plist`, `indicator`, `value`)
8584
8685
:parameter plist: An instance of :drm:`<sequence>`.
8786
:parameter indicator: An instance of :drm:`<object>`.
@@ -120,9 +119,8 @@ Reference
120119
if any.
121120

122121
:macrocall:
123-
.. code-block:: dylan
124-
125-
remove-property!(*plist*, *indicator*)
122+
.. parsed-literal::
123+
remove-property!(`plist`, `indicator`)
126124
127125
:parameter plist: An instance of :drm:`<sequence>`.
128126
:parameter indicator: An instance of :drm:`<object>`.
@@ -157,16 +155,13 @@ Reference
157155
:statement:
158156

159157
:macrocall:
160-
.. code-block:: dylan
161-
162-
with-keywords-removed(*var* = *plist*, *keywords*)
163-
*body*
164-
end
158+
.. parsed-literal::
159+
with-keywords-removed(`var` = `plist`, `keywords`) `body` end
165160
166-
:parameter var: A Dylan name *bnf*.
161+
:parameter var: A Dylan name *BNF*.
167162
:parameter plist: An instance of :drm:`<sequence>`.
168163
:parameter keywords: An instance of :drm:`<sequence>`.
169-
:parameter body: A Dylan body *bnf*.
164+
:parameter body: A Dylan body *BNF*.
170165

171166
:description:
172167

documentation/library-reference/source/collections/table-extensions.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ init-keyword. The legal values for this keyword are:
7373
- ``#"value"`` Creates a table with weak values. When there are no longer
7474
any strong references to a value, the table entry of which it is a
7575
part becomes eligible for garbage collection.
76-
- ``#f`` Creates a table with strong keys and values. This is the default
76+
- :drm:`#f` Creates a table with strong keys and values. This is the default
7777
value.
7878

7979
The table-extensions Module
@@ -104,13 +104,13 @@ from the module *table-extensions*.
104104

105105
.. class:: <case-insensitive-string-table>
106106
:sealed:
107-
107+
108108
A table class that uses case-insensitive strings for keys.
109-
109+
110110
:superclasses: :drm:`<table>`
111-
111+
112112
:description:
113-
113+
114114
The ``<string-table>`` class is the class of tables that use
115115
instances of :drm:`<string>` for their keys. It is an error to use a
116116
key that is not an instance of :drm:`<string>`.
@@ -147,7 +147,7 @@ from the module *table-extensions*.
147147
:parameter elt-hash-function: An instance of :drm:`<function>`.
148148
:parameter collection: An instance of :drm:`<collection>`.
149149
:parameter initial-state: An instance of ``<hash-state>``.
150-
:parameter #key ordered: An instance of :drm:`<boolean>`. Default value: ``#f``.
150+
:parameter #key ordered: An instance of :drm:`<boolean>`. Default value: :drm:`#f`.
151151
:value hash-id: An instance of :drm:`<integer>`.
152152
:value result-state: An instance of ``<hash-state>``.
153153

@@ -172,7 +172,7 @@ from the module *table-extensions*.
172172
:parameter elt-hash-function: An instance of :drm:`<function>`.
173173
:parameter sequence: An instance of :drm:`<sequence>`.
174174
:parameter initial-state: An instance of ``<hash-state>``.
175-
:parameter #key ordered: An instance of :drm:`<boolean>`. Default value: ``#f``.
175+
:parameter #key ordered: An instance of :drm:`<boolean>`. Default value: :drm:`#f`.
176176
:value hash-id: An instance of :drm:`<integer>`.
177177
:value result-state: An instance of ``<hash-state>``.
178178

@@ -346,26 +346,26 @@ from the module *table-extensions*.
346346

347347
.. macro:: tabling
348348
:macro-type: Function
349-
349+
350350
Creates a table and populates it with keys and values.
351-
351+
352352
:macrocall:
353-
.. parsed-literal::
354-
tabling( { `class`, } `key` => `value`, ...)
355-
353+
.. parsed-literal::
354+
tabling( [ `class`, ] `key` => `value`, ...)
355+
356356
:parameter class: An instance of :drm:`<class>`. Optional.
357357
:parameter key: An expression.
358358
:parameter value: An expression.
359359
:value table: A new instance of *class*.
360-
360+
361361
:description:
362-
362+
363363
Creates a table of type *class* and populates it with *key*/*value*
364364
pairs. If *class* is omitted, creates a table of type :drm:`<table>`.
365365

366366
:example:
367-
367+
368368
.. code-block:: dylan
369369
370-
let my-table = tabling("red"=>"stop", "green"=>"go");
371-
let my-table = tabling(<string-table>, "red"=>"stop", "green"=>"go");
370+
let my-table = tabling(#"red" => "stop", #"green" => "go");
371+
let my-table = tabling(<string-table>, "red" => "stop", "green" => "go");

documentation/library-reference/source/coloring-stream/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The coloring-stream Module
9898
to determine whether or not the underlying stream supports
9999
color output.
100100

101-
When *force-ansi?* is ``#t``, then the usual checks are skipped
101+
When *force-ansi?* is :drm:`#t`, then the usual checks are skipped
102102
and a coloring stream that generates ANSI output is created.
103103
This is useful when outputting to a string prior to writing the
104104
text to :var:`*standard-output*` or when writing a network server
@@ -163,7 +163,7 @@ The coloring-stream Module
163163
ANSI color output, assuming that the underlying stream
164164
supports color output at all.
165165

166-
On Unix, this will always return ``#t``.
166+
On Unix, this will always return :drm:`#t`.
167167

168168
On Windows, this attempts to detect situations where ANSI
169169
output would be permissible, such as running within an

documentation/library-reference/source/command-line-parser/index.rst

+13-13
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ The command-line-parser Module
349349

350350
:signature: print-synopsis (parser subcommand #key stream) => ()
351351
:parameter parser: An instance of :class:`<command-line-parser>`.
352-
:parameter subcommand: An instance of :class:`<subcommand>` or ``#f``.
352+
:parameter subcommand: An instance of :class:`<subcommand>` or :drm:`#f`.
353353
:parameter #key stream: An instance of :class:`<stream>`.
354354

355355
:description:
@@ -359,15 +359,15 @@ The command-line-parser Module
359359

360360
.. function:: option-present?
361361

362-
Returns ``#t`` if this option was supplied on the command line.
362+
Returns :drm:`#t` if this option was supplied on the command line.
363363

364364
:signature: option-present? (option) => (present?)
365365
:parameter option: An instance of :class:`<option>`.
366366
:value present?: An instance of :drm:`<boolean>`.
367367
:description:
368368

369-
Returns ``#t`` if this option was supplied on the command line. Returns
370-
``#f`` if called before :func:`parse-command-line` has been called on the
369+
Returns :drm:`#t` if this option was supplied on the command line. Returns
370+
:drm:`#f` if called before :func:`parse-command-line` has been called on the
371371
associated parser, or if the option wasn't supplied on the command line.
372372

373373
.. function:: option-value
@@ -382,7 +382,7 @@ The command-line-parser Module
382382
Returns the parsed value of the option supplied on the command line. If
383383
no value was supplied on the command line it returns the value specified
384384
with ``default:`` when the option was created, which in turn defaults to
385-
``#f``.
385+
:drm:`#f`.
386386

387387
Note that the type of the return value is specified by the ``type:``
388388
keyword argument when the option was created and the string supplied on
@@ -517,7 +517,7 @@ Option Classes
517517

518518
A default value for the option that will be used if the option isn't
519519
specified by the user. The default value should be a member of the type
520-
specified with the ``type:`` keyword. ``#f`` is the default default value.
520+
specified with the ``type:`` keyword. :drm:`#f` is the default default value.
521521

522522
.. class:: <flag-option>
523523
:sealed:
@@ -532,7 +532,7 @@ Option Classes
532532

533533
:description:
534534

535-
They default to ``#f`` and may exist in both positive and negative forms:
535+
They default to :drm:`#f` and may exist in both positive and negative forms:
536536
``--foo`` and ``--no-foo``. In the case of conflicting options, the
537537
rightmost takes precedence to allow for abuse of the shell's "alias"
538538
command.
@@ -554,7 +554,7 @@ Option Classes
554554

555555
If the option appears more than once, the rightmost value takes
556556
precedence. If the option never appears, these will default to
557-
``#f``.
557+
:drm:`#f`.
558558

559559
Examples::
560560

@@ -572,8 +572,8 @@ Option Classes
572572
:description:
573573

574574
The parameter must directly follow the option with no intervening
575-
whitespace, or follow an "=" token. The value is ``#f`` if the option
576-
never appears, ``#t`` if the option appears but the parameter does
575+
whitespace, or follow an "=" token. The value is :drm:`#f` if the option
576+
never appears, :drm:`#t` if the option appears but the parameter does
577577
not, and the value of the parameter otherwise.
578578

579579
Examples::
@@ -617,12 +617,12 @@ Option Classes
617617
:class:`<usage-error>` is signaled. If you supply a sequence of
618618
non-string choices you will also need to supply the ``test:``
619619
init keyword since all command-line arguments are strings and
620-
won't compare equal with the default test, ``=``.
620+
won't compare equal with the default test, :drm:`=`.
621621

622622
:keyword test:
623623

624624
A function to test whether the value supplied on the command line
625-
is the same as one of the choices. The default is ``=``. Another
625+
is the same as one of the choices. The default is :drm:`=`. Another
626626
commonly used value is ``string-equal-ic?``, to ignore case in the
627627
comparison.
628628

@@ -651,7 +651,7 @@ Option Classes
651651
The final value is a :class:`<string-table>` containing each specified
652652
key, with one of the following values:
653653

654-
* ``#t``: The user specified "-Dkey"
654+
* :drm:`#t`: The user specified "-Dkey"
655655
* a string: The user specified "-Dkey=value"
656656

657657
You can read this with ``element(table, key, default: #f)`` to get a

0 commit comments

Comments
 (0)