summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3clist.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index bcac2b813ea..fa743396b72 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-08-14}
+% \date{Released 2019-08-25}
%
% \maketitle
%
@@ -401,6 +401,9 @@
%
% The functions described in this section apply a specified function
% to each item of a comma list.
+% All mappings are done at the current group level, \emph{i.e.}~any
+% local assignments made by the \meta{function} or \meta{code} discussed
+% below remain in effect after the loop.
%
% When the comma list is given explicitly, as an \texttt{n}-type argument,
% spaces are trimmed around each item.
@@ -448,7 +451,9 @@
% (token list) \meta{variable} and applies the \meta{code}. The
% \meta{code} will usually make use of the \meta{variable}, but this
% is not enforced. The assignments to the \meta{variable} are local.
-% The \meta{items} are returned from left to right.
+% Its value after the loop is the last \meta{item} in the \meta{comma
+% list}, or its original value if there were no \meta{item}. The
+% \meta{items} are returned from left to right.
% \end{function}
%
% \begin{function}[rEXP, updated = 2012-06-29]{\clist_map_break:}
@@ -1694,6 +1699,8 @@
% additionally we store each item in the given variable.
% As for inline mappings, space trimming for the \texttt{n}
% variant is done by storing the comma list in a variable.
+% The quark test is done before assigning the item to the variable:
+% this avoids storing a quark which the user wouldn't expect.
% The strange \cs{use:n} avoids unlikely problems when |#2| would
% contain \cs{q_recursion_stop}.
% \begin{macrocode}
@@ -1715,8 +1722,8 @@
}
\cs_new_protected:Npn \@@_map_variable:Nnw #1#2#3,
{
+ \quark_if_recursion_tail_stop:n {#3}
\tl_set:Nn #1 {#3}
- \quark_if_recursion_tail_stop:N #1
\use:n {#2}
\@@_map_variable:Nnw #1 {#2}
}