doc/: Reorder the arguments to `\descref'.
[sod] / doc / clang.tex
index b572fe4..92c822b 100644 (file)
@@ -68,11 +68,11 @@ specified to return interned objects: programs may rely on receiving the same
 not specified, clients may still not rely on receiving fresh objects.
 
 A convenient S-expression notation is provided by the
-\descref{c-type}[macro]{mac}.  Use of this macro is merely an abbreviation
+\descref{mac}{c-type}[macro].  Use of this macro is merely an abbreviation
 for corresponding use of the various constructor functions, and therefore
 interns type objects in the same manner.  The syntax accepted by the macro
-can be extended in order to support new classes: see \descref{defctype}{mac},
-\descref{c-type-alias}{mac} and \descref{define-c-type-syntax}{mac}.
+can be extended in order to support new classes: see \descref{mac}{defctype},
+\descref{mac}{c-type-alias} and \descref{mac}{define-c-type-syntax}.
 
 The descriptions of each of the various classes include descriptions of the
 initargs which may be passed to @|make-instance| when constructing a new
@@ -83,9 +83,9 @@ syntax are strongly recommended over direct use of @|make-instance|.
 There are two protocols for printing C types.  Unfortunately they have
 similar names.
 \begin{itemize}
-\item The \descref{print-c-type}[function]{gf} prints a C type value using
+\item The \descref{gf}{print-c-type}[function] prints a C type value using
   the S-expression notation.  It is mainly useful for diagnostic purposes.
-\item The \descref{pprint-c-type}[function]{gf} prints a C type as a
+\item The \descref{gf}{pprint-c-type}[function] prints a C type as a
   C-syntax declaration.
 \end{itemize}
 Neither generic function defines a default primary method; subclasses of
@@ -169,7 +169,7 @@ type specifier.  Type specifiers fit into two syntactic categories.
 \begin{describe}{gf}{expand-c-type-spec @<type-spec> @> @<form>}
   Returns the Lisp form that @|(c-type @<type-spec>)| would expand into.
 
-  If @<type-spec> is a list, then \descref{expand-c-type-form}{gf} is
+  If @<type-spec> is a list, then \descref{gf}{expand-c-type-form} is
   invoked.
 \end{describe}
 
@@ -258,14 +258,14 @@ argument lists for methods.  This is done by @|c-type-equal-p|.
   directly attached.  If the @<kernel> function intends to provide its own
   additional declarator operators, it should check the @<priority> in order
   to determine whether parentheses are necessary.  See also the
-  \descref{maybe-in-parens}[macro]{mac}.
+  \descref{mac}{maybe-in-parens}[macro].
 
   The @<spacep> argument indicates whether a space needs to be printed in
   order to separate the declarator from the declaration specifiers.  A kernel
   which contains an identifier should insert a space before the identifier
   when @<spacep> is non-nil.  An `empty' kernel, as found in an abstract
   declarator (one that specifies no name), looks more pleasing without a
-  trailing space.  See also the \descref{c-type-space}[function]{fun}.
+  trailing space.  See also the \descref{fun}{c-type-space}[function].
 
   Every concrete subclass of @|c-type| is expected to provide a primary
   method on this function.  There is no default primary method.
@@ -329,7 +329,7 @@ is shown in \xref{tab:clang.ctypes.qual}.
 
 The default behaviour, on output, is to convert keywords to lowercase and
 hope for the best: special cases can be dealt with by adding appropriate
-methods to \descref{c-qualifier-keyword}{gf}.
+methods to \descref{gf}{c-qualifier-keyword}.
 
 \begin{describe}{cls}{qualifiable-c-type (c-type) \&key :qualifiers}
   The class @|qualifiable-c-type| describes C types which can bear
@@ -579,7 +579,7 @@ In Sod, the leaf types are
   evaluated).
 
   Each of the @<string>s is associated with the resulting type for retrieval
-  by \descref{find-simple-c-type}{fun}.  Furthermore, a variable
+  by \descref{fun}{find-simple-c-type}.  Furthermore, a variable
   @|c-type-@<name>| is defined, for the first @<name> only, and initialized
   with the newly constructed C type object.
 
@@ -590,7 +590,7 @@ In Sod, the leaf types are
 \begin{describe}{fun}
     {find-simple-c-type @<string> @> @{ @<simple-c-type> @! @|nil| @}}
   If @<string> is the name of a simple C type, as established by the
-  \descref{define-simple-c-type}[macro]{mac}, then return the corresponding
+  \descref{mac}{define-simple-c-type}[macro], then return the corresponding
   @|simple-c-type| object; otherwise, return @|nil|.
 \end{describe}
 
@@ -820,8 +820,8 @@ function type is the type of the function's return value.
   argument name.
 
   A @<default> may be supplied.  If the argument is used in a
-  keyword-argument list (e.g., in a \descref{c-keyword-function-type}
-  [object]{cls}), and the @<default> value is provided and non-nil, then its
+  keyword-argument list (e.g., in a \descref{cls}{c-keyword-function-type}
+  [object]), and the @<default> value is provided and non-nil, then its
   (unescaped) printed representation is used to provide a default value if
   the keyword argument is not supplied by the caller.
 \end{describe}
@@ -973,7 +973,7 @@ function type is the type of the function's return value.
   these circumstances obtains, then the specifier constructs an ordinary
   function type.)
 
-  See the description of \descref{c-function-type}{cls} for how a trailing
+  See the description of \descref{cls}{c-function-type} for how a trailing
   @<form> is handled.
 
   The list of @<arg-name>s and @<arg-type>s describes the positional
@@ -987,7 +987,7 @@ function type is the type of the function's return value.
   accepting the @<arguments>.
 
   If the @<arguments> list contains a @|:keys| marker, then a
-  \descref{c-keyword-function-type}[object]{cls} is returned: those arguments
+  \descref{cls}{c-keyword-function-type}[object] is returned: those arguments
   preceding the @|:keys| marker form the positional argument list, and those
   following the marker form the list of keyword arguments.
 \end{describe}
@@ -1016,7 +1016,7 @@ function type is the type of the function's return value.
 \begin{describe}{fun}{reify-variable-argument-tail @<arguments> @> @<list>}
   If the @<argument> list contains an @|:ellipsis| marker, then replace it
   with a @|va_list|.  The name for the new argument, if any, is taken from
-  the \descref{*sod-ap*}[variable]{var}.  The new list is returned; the
+  the \descref{var}{*sod-ap*}[variable].  The new list is returned; the
   original list is not modified, but may share structure with the new list.
 \end{describe}
 
@@ -1029,7 +1029,7 @@ function type is the type of the function's return value.
   The @<lists> parameter is a list consisting of a number of
   @|(@<report-function> . @<args>)| pairs: in each pair, @<report-function>
   is either nil or a function designator, and @<args> is a list of
-  \descref{argument}{cls} objects.
+  \descref{cls}{argument} objects.
 
   The resulting list contains exactly one argument for each distinct argument
   name appearing in the input @<lists>; this argument will contain the
@@ -1043,7 +1043,7 @@ function type is the type of the function's return value.
   arguments and is expected to return two values:
   \begin{itemize}
   \item a file location @<floc> or other object acceptable to
-    \descref{file-location}{gf}, to be used as the location of the main
+    \descref{gf}{file-location}, to be used as the location of the main
     error; and
   \item an object @<what>, whose printed representation should be a noun
     phrase describing the object for which the argument lists are being
@@ -1056,7 +1056,7 @@ function type is the type of the function's return value.
   for the @<args> lists containing the conflicting argument objects are
   called, in an arbitrary order, with a single argument which is the
   offending @|argument| object; the function is expected to issue information
-  messages (see \descref{info}{fun}) to give more detail for diagnosing the
+  messages (see \descref{fun}{info}) to give more detail for diagnosing the
   conflict.  If a @<report-function> is nil, then nothing happens; this is
   considered poor practice.
 \end{describe}
@@ -1072,7 +1072,7 @@ function type is the type of the function's return value.
   arguments, if any, will be printed by @<print-args>.
 
   The @<print-kernel> function is a standard kernel-printing function
-  following the \descref{pprint-c-type}[protocol]{gf}.
+  following the \descref{gf}{pprint-c-type}[protocol].
 
   The @<print-args> function is given a single argument, which is the
   @<stream> to print on.  It should not print the surrounding parentheses.
@@ -1086,7 +1086,7 @@ function type is the type of the function's return value.
 \begin{describe}{fun}{pprint-argument-list @<args> @<stream> @> @<flag>}
   Print an argument list to @<stream>.
 
-  The @<args> is a list of \descref{argument}[objects]{cls}, optionally
+  The @<args> is a list of \descref{cls}{argument}[objects], optionally
   containing an @|:ellipsis| marker.  The function returns true if any
   arguments were actually printed.
 \end{describe}