summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3expan.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3expan.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx25
1 files changed, 20 insertions, 5 deletions
diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx
index 9288a5271c..8e52b52659 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-05-22}
+% \date{Released 2023-06-05}
%
% \maketitle
%
@@ -134,7 +134,8 @@
% comma-separated list of \meta{variant argument specifiers} is
% then used to define variants of the
% \meta{original argument specifier} if these are not already
-% defined. For each \meta{variant} given, a function is created
+% defined; entries which correspond to existing functions are silently
+% ingored. For each \meta{variant} given, a function is created
% that expands its arguments as detailed and passes them
% to the \meta{parent control sequence}. So for example
% \begin{verbatim}
@@ -150,7 +151,7 @@
% generates the functions |\foo:NV| and |\foo:cV| in the same
% way. The \cs{cs_generate_variant:Nn} function should only be applied if
% the \meta{parent control sequence} is already defined. (This is only
-% enforced if debugging support is enabled.)
+% enforced if debugging support \texttt{check-declarations} is enabled.)
% If the \meta{parent
% control sequence} is protected or if the \meta{variant} involves any
% |x|~argument, then the \meta{variant control sequence} is also
@@ -158,7 +159,9 @@
% \cs[no-index]{exp_args:N\meta{variant}} function needed to carry out the
% expansion. There is no need to re-apply \cs{cs_generate_variant:Nn} after
% changing the definition of the parent function: the variant will always
-% use the current definition of the parent.
+% use the current definition of the parent. Providing variants repeatedly is
+% safe as \cs{cs_generate_variant:Nn} will only create new definitions if
+% there is not already one available.
%
% Only |n|~and |N| arguments can be changed to other types. The only
% allowed changes are
@@ -1729,7 +1732,7 @@
%
% The other case where variants should be protected is when the parent
% function is a protected macro: then |protected| appears in the
-% meaning before the fist occurrence of |macro|. The |ww| auxiliary
+% meaning before the first occurrence of |macro|. The |ww| auxiliary
% removes everything in the meaning string after the first |ma|. We
% use |ma| rather than the full |macro| because the meaning of the
% \tn{firstmark} primitive (and four others) can contain an arbitrary
@@ -2387,6 +2390,18 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Held-over variant generation}
+%
+% \begin{macro}{\cs_generate_from_arg_count:NNno}
+% \begin{macro}{\cs_replacement_spec:c}
+% A couple of variants that are from early functions.
+% \begin{macrocode}
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno }
+\cs_generate_variant:Nn \cs_replacement_spec:N { c }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}