+%% \begin{describe*}
+%% {\dhead[MOD]{CAT}{...}...[NAME]{SYNOPSIS}
+%% ...}
+%% ...
+%% \end{describe*}
+%%
+%% This is the fancy form of `describe' for describing several different
+%% things at once.
+\@namedef{describe*}#1{\desc@begin{#1}}
+\expandafter\let\csname enddescribe*\endcsname\desc@end
+
+%% \parse@dlbl{NEXT}[MOD]{CAT}{...}...{LABEL}
+%%
+%% Parse a description label, and call
+%%
+%% NEXT{MOD}{CAT}{{...}...}{LABEL}
+%%
+%% This handles defaulting the MOD correctly, based on the LABEL text. See
+%% `\descref' for the details.
+\def\parse@dlbl#1{\@ifnextchar[{\parse@dlbl@a{#1}}{\parse@dlbl@c{#1}}}
+\def\parse@dlbl@a#1[#2]#3{\@desc@dispatch{descargs}{#3}{#1{#2}{#3}}}
+\def\parse@dlbl@c#1#2%
+ {\@desc@dispatch{descargs}{#2}{\parse@dlbl@cb{#1}{#2}}}
+\def\parse@dlbl@cb#1#2#3#4{%
+ \def\temp@##1##2*##3\q@{\def\temp@{##1##3}}\temp@#4*\q@%
+ \ifx\temp@\@starstar\def\next@{#1{muffs}{#2}{#3}{#4}}%
+ \else\def\temp@##1##2\q@{\def\temp@{##1}}\temp@#4\q@%
+ \if:\temp@\def\next@{#1{kwd}{#2}{#3}{#4}}
+ \else\def\next@{#1{plain}{#2}{#3}{#4}}\fi\fi%
+ \next@%
+}
+
+%% \descref[MOD]{CAT}{...}...{LABEL}[TEXT]
+%% \descref*[MOD]{CAT}{...}...{LABEL}
+%%
+%% Typesets a cross-reference to a described thing. The CAT names the
+%% category of thing being described, and the LABEL names the specific thing.
+%%
+%% The {...}... are any additional arguments required by the category's kind
+%% (e.g., method specializers).
+%%
+%% The MOD is the modifier to apply, similar (but subtly different from) to
+%% the `describe' environment. If omitted, it will usually default to
+%% `plain', but in the absence of a NAME, some kinds of synopses are
+%% recognized specially:
+%%
+%% * `*NAME*': defaults MOD to `muffs'.
+%%
+%% * `:NAME': defaults MOD to `kwd'.
+%%
+%% (`setf' is /not/ specially detected here. Write an explicit `setf'
+%% modifier if necessary, because it's no more typing.)
+%%
+%% Usually a page-number cross-reference is included, so as to help readers
+%% of a dead-tree copy; this is suppressed by the `*' version.
+\def\descref{\@ifstar%
+ {\parse@dlbl{\descref@i\relax\@gobble\relax}}%
+ {\parse@dlbl{\descref@i{ (}\autopageref)}}}
+\def\descref@i#1#2#3#4#5#6#7{\@ifnextchar@preserve[%
+ % {PGA}{PGB}{PGC}{MOD}{CAT}{{...}...}{LABEL}
+ {\descref@ii{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
+ {\descref@iii{#1}{#2}{#3}{#4}{#5}{#6}{#7}{}}}
+\def\descref@ii#1#2#3#4#5#6#7[#8]%
+ % {PGA}{PGB}{PGC}{MOD}{CAT}{{...}...}{LABEL}[AFTER]
+ {\descref@iii{#1}{#2}{#3}{#4}{#5}{#6}{#7}{ #8}}
+\def\descref@iii#1#2#3#4#5#6#7#8{%
+ % {PGA}{PGB}{PGC}{MOD}{CAT}{{...}...}{LABEL}{AFTER}
+ \begingroup%
+ \let\protect\@empty\def\@uscore{-\@gobble}%
+ \edef\temp@{\@desc@dispatch{desclabel}{#5}{#4}{#5}#6{#7}}%
+ \edef\next@##1##2##3{\endgroup%
+ \noexpand\hyperref[\temp@]{##1}##2{\temp@}##3}%
+ \next@{\code{#7}}{#8#1#2}{#3}%
+}
+
+%% \descindex[MOD]{CAT}{...}...{LABEL}[SUFFIX]
+%%
+%% Set a label and index entry here, as if for a description. The CAT names
+%% the category of thing being described, and the LABEL names the specific
+%% thing, as for `\descref'. The {...}... are any additional arguments
+%% required by the category's kind (e.g., method specializers). The MOD is
+%% the modifier to apply; see `\descref' for the details.
+%%
+%% The SUFFIX is appended to the index-entry text; by default it is empty.
+%% Useful values are `|(' and `|)' to set ranges.
+\def\descindex{\parse@dlbl\descindex@i}
+\def\descindex@i#1#2#3#4{\@ifnextchar[%
+ {\descindex@ii{#1}{#2}{#3}{#4}}%
+ {\descindex@ii{#1}{#2}{#3}{#4}[]}}
+\def\descindex@ii#1#2#3#4[#5]{%
+ {\begingroup\lccode`\~=`\_\lowercase{\endgroup\def~{_}}%
+ \protected@edef\@tempa{%
+ \noexpand\index{\@desc@dispatch{descindex}{#2}{#1}{#2}#3{#4}#5}}%
+ \@tempa}%
+}
+
+%% \desclabel[MOD]{CAT}{...}...{LABEL}[INDEX-SUFFIX]
+%%
+%% Set a label and index entry here, as if for a description. The CAT names
+%% the category of thing being described, and the LABEL names the specific
+%% thing, as for `\descref'. The {...}... are any additional arguments
+%% required by the category's kind (e.g., method specializers). The MOD is
+%% the modifier to apply; see `\descref' for the details.
+%%
+%% This will also add an index entry, as for `\descindex'; the INDEX-SUFFIX
+%% argument has the same effect as its SUFFIX argument.
+\def\desclabel{\parse@dlbl\desclabel@i}
+\def\desclabel@i#1#2#3#4{%
+ \begingroup%
+ \let\protect\@empty\def\@uscore{-\@gobble}%
+ \edef\@tempa{\@desc@dispatch{desclabel}{#2}{#1}{#2}#3{#4}}%
+ \phantomsection\label{\@tempa}%
+ \endgroup%
+ \descindex@i{#1}{#2}{#3}{#4}%
+}
+
+%% Description categories.
+\definedescribecategory{sym}{symbol}
+\definedescribecategory{fun}{#1{function}}
+\definedescribecategory{gf}{generic #1{function}}
+\definedescribecategory{msg}{message}
+\definedescribecategory{var}{variable}
+\definedescribecategory{modvar}{module variable}
+\definedescribecategory{const}{constant}
+\definedescribecategory{meth}[method]{primary #1{method}}
+\definedescribecategory{ar-meth}[method]{\code{:around} #1{method}}
+\definedescribecategory{be-meth}[method]{\code{:before} #1{method}}
+\definedescribecategory{af-meth}[method]{\code{:after} #1{method}}
+\definedescribecategory{cls}{class}
+\definedescribecategory{rst}{restart}
+\definedescribecategory{ty}{type}
+\definedescribecategory{mac}{#1{macro}}
+\definedescribecategory{feat}{feature macro}
+\definedescribecategory{lmac}{local #1{macro}}
+\definedescribecategory{parse}{parser spec}
+\definedescribecategory{parseform}{parser form}
+\definedescribecategory{opt}{option handler}
+\definedescribecategory{optmac}{option macro}
+\definedescribecategory{plug}{pluggable parser}
+