[latex3-commits] [latex3/latex3] main: Add e-type variants for expandable clist funcs (see #1257) (3720facf3)

github at latex-project.org github at latex-project.org
Fri Sep 8 19:12:31 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/3720facf3e9c8995a2be084116c3408b11f1f8ae

>---------------------------------------------------------------

commit 3720facf3e9c8995a2be084116c3408b11f1f8ae
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 8 16:07:55 2023 +0100

    Add e-type variants for expandable clist funcs  (see #1257)
    
    These come up a few times and seem reasonable
    enough.


>---------------------------------------------------------------

3720facf3e9c8995a2be084116c3408b11f1f8ae
 l3kernel/l3clist.dtx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index 0eaac6a53..3ce34a01d 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -444,7 +444,7 @@
 % \texttt{n}-type comma lists.
 %
 % \begin{function}[rEXP, updated = 2012-06-29]
-%   {\clist_map_function:NN, \clist_map_function:cN, \clist_map_function:nN}
+%   {\clist_map_function:NN, \clist_map_function:cN, \clist_map_function:nN, \clist_map_function:eN}
 %   \begin{syntax}
 %     \cs{clist_map_function:NN} \meta{clist~var} \meta{function}
 %   \end{syntax}
@@ -548,7 +548,7 @@
 % \end{function}
 %
 % \begin{function}[EXP, added = 2012-07-13]
-%   {\clist_count:N, \clist_count:c, \clist_count:n}
+%   {\clist_count:N, \clist_count:c, \clist_count:n, \clist_count:e}
 %   \begin{syntax}
 %     \cs{clist_count:N} \meta{clist~var}
 %   \end{syntax}
@@ -722,7 +722,7 @@
 % \section{Using a single item}
 %
 % \begin{function}[added = 2014-07-17, EXP]
-%   {\clist_item:Nn, \clist_item:cn, \clist_item:nn}
+%   {\clist_item:Nn, \clist_item:cn, \clist_item:nn, \clist_item:en}
 %   \begin{syntax}
 %     \cs{clist_item:Nn} \meta{clist~var} \Arg{int expr}
 %   \end{syntax}
@@ -1726,7 +1726,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\clist_map_function:nN}
+% \begin{macro}{\clist_map_function:nN, \clist_map_function:eN}
 % \UnitTested
 % \begin{macro}{\@@_map_function_n:Nn}
 % \begin{macro}{\@@_map_unbrace:wn}
@@ -1745,6 +1745,7 @@
       \s_@@_stop \clist_map_break: ,
     \prg_break_point:Nn \clist_map_break: { }
   }
+\cs_generate_variant:Nn \clist_map_function:nN { e }
 \cs_new:Npn \@@_map_function_n:Nn #1 #2
   {
     \@@_use_none_delimit_by_s_stop:w #2 \s_@@_stop
@@ -1893,7 +1894,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\clist_count:N, \clist_count:c, \clist_count:n}
+% \begin{macro}{\clist_count:N, \clist_count:c, \clist_count:n, \clist_count:e}
 % \begin{macro}{\@@_count:n}
 % \begin{macro}{\@@_count:w}
 %   Counting the items in a comma list is done using the same approach as for
@@ -1933,6 +1934,7 @@
       }
   }
 \exp_args:No \@@_tmp:w \c_space_tl
+\cs_generate_variant:Nn \clist_count:n { e }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -2110,7 +2112,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\clist_item:nn}
+% \begin{macro}{\clist_item:nn, \clist_item:en}
 % \begin{macro}{
 %     \@@_item_n:nw,
 %     \@@_item_n_loop:nw,
@@ -2130,6 +2132,7 @@
       {#1}
       \@@_item_n:nw
   }
+\cs_generate_variant:Nn \clist_item:nn { e }
 \cs_new:Npn \@@_item_n:nw #1
   { \@@_item_n_loop:nw {#1} \prg_do_nothing: }
 \cs_new:Npn \@@_item_n_loop:nw #1 #2,





More information about the latex3-commits mailing list.