[latex3-commits] [git/LaTeX3-latex3-latex3] gh900: Actually fix unbracing behaviour of \clist_map_tokens:Nn (see #900) (919553c85)

Bruno Le Floch blflatex at gmail.com
Wed May 5 15:27:29 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : gh900
Link       : https://github.com/latex3/latex3/commit/919553c85ec5f1ee3e79831358e3b490aa8d11d5

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

commit 919553c85ec5f1ee3e79831358e3b490aa8d11d5
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)


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

919553c85ec5f1ee3e79831358e3b490aa8d11d5
 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 f79c60e95..df8909450 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.