[latex3-commits] [git/LaTeX3-latex3-latex3] main: Actually fix unbracing behaviour of \clist_map_tokens:Nn (see #900) (5106c1923)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri May 7 11:59:15 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/5106c192356fdafb42f4ce037fd5bacaf0b5e815
>---------------------------------------------------------------
commit 5106c192356fdafb42f4ce037fd5bacaf0b5e815
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Wed May 5 15:27:29 2021 +0200
Actually fix unbracing behaviour of \clist_map_tokens:Nn (see #900)
>---------------------------------------------------------------
5106c192356fdafb42f4ce037fd5bacaf0b5e815
l3kernel/l3clist.dtx | 7 ++++---
l3kernel/testfiles/m3clist002.tlg | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index a3b31b77d..9ebe9260c 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -1798,7 +1798,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\clist_map_tokens:nn, \@@_map_tokens_n:nw}
+% \begin{macro}{\clist_map_tokens:nn, \@@_map_tokens_n:nw, \@@_use_ii_i:nn}
% Similar to \cs{clist_map_function:nN} but with a different way of
% grabbing items because we cannot use \cs{exp_after:wN} to pass the
% \meta{code}.
@@ -1814,11 +1814,12 @@
\tl_if_empty:oF { \use_none:nn #2 ? }
{
\exp_args:No \@@_if_recursion_tail_break:nN {#2} \clist_map_break:
- \exp_after:wN \@@_map_unbrace:wn
- \exp:w \tl_trim_spaces_apply:oN {#2} \exp_end: , {#1}
+ \tl_trim_spaces_apply:oN {#2} \@@_use_ii_i:nn
+ \@@_map_unbrace:wn , {#1}
}
\@@_map_tokens_n:nw {#1} \prg_do_nothing:
}
+\cs_new:Npn \@@_use_ii_i:nn #1#2 { #2 #1 }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/testfiles/m3clist002.tlg b/l3kernel/testfiles/m3clist002.tlg
index ac08cd461..2c8bf5dac 100644
--- a/l3kernel/testfiles/m3clist002.tlg
+++ b/l3kernel/testfiles/m3clist002.tlg
@@ -306,7 +306,7 @@ cc
\B :a
aa
bb\par
-{cc}
+cc
============================================================
============================================================
TEST 25: map_variable
More information about the latex3-commits
mailing list.