[latex3-commits] [latex3/latex2e] main: Update l3kernel to 2023-05-22 (39d2173e)

github at latex-project.org github at latex-project.org
Mon May 22 19:33:53 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : main
Link       : https://github.com/latex3/latex2e/commit/39d2173e26e35bc75b0e7ee1bc95737aa2ec9b54

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

commit 39d2173e26e35bc75b0e7ee1bc95737aa2ec9b54
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon May 22 18:33:53 2023 +0100

    Update l3kernel to 2023-05-22


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

39d2173e26e35bc75b0e7ee1bc95737aa2ec9b54
 texmf/tex/latex/l3kernel/expl3-code.tex    | 284 +++++++++++++++++++----------
 texmf/tex/latex/l3kernel/expl3-generic.tex |   2 +-
 texmf/tex/latex/l3kernel/expl3.ltx         |   2 +-
 texmf/tex/latex/l3kernel/expl3.sty         |   2 +-
 4 files changed, 194 insertions(+), 96 deletions(-)

diff --git a/texmf/tex/latex/l3kernel/expl3-code.tex b/texmf/tex/latex/l3kernel/expl3-code.tex
index 583482f5..f1de7169 100644
--- a/texmf/tex/latex/l3kernel/expl3-code.tex
+++ b/texmf/tex/latex/l3kernel/expl3-code.tex
@@ -71,7 +71,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-05-15}%
+\def\ExplFileDate{2023-05-22}%
 \begingroup
   \def\next{\endgroup}%
   \expandafter\ifx\csname PackageError\endcsname\relax
@@ -1531,6 +1531,41 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
 \cs_set:Npn \use_ii:nnnn  #1#2#3#4 {#2}
 \cs_set:Npn \use_iii:nnnn #1#2#3#4 {#3}
 \cs_set:Npn \use_iv:nnnn  #1#2#3#4 {#4}
+\cs_set:Npn \use_i:nnnnn   #1#2#3#4#5 {#1}
+\cs_set:Npn \use_ii:nnnnn  #1#2#3#4#5 {#2}
+\cs_set:Npn \use_iii:nnnnn #1#2#3#4#5 {#3}
+\cs_set:Npn \use_iv:nnnnn  #1#2#3#4#5 {#4}
+\cs_set:Npn \use_v:nnnnn   #1#2#3#4#5 {#5}
+\cs_set:Npn \use_i:nnnnnn   #1#2#3#4#5#6 {#1}
+\cs_set:Npn \use_ii:nnnnnn  #1#2#3#4#5#6 {#2}
+\cs_set:Npn \use_iii:nnnnnn #1#2#3#4#5#6 {#3}
+\cs_set:Npn \use_iv:nnnnnn  #1#2#3#4#5#6 {#4}
+\cs_set:Npn \use_v:nnnnnn   #1#2#3#4#5#6 {#5}
+\cs_set:Npn \use_vi:nnnnnn  #1#2#3#4#5#6 {#6}
+\cs_set:Npn \use_i:nnnnnnn   #1#2#3#4#5#6#7 {#1}
+\cs_set:Npn \use_ii:nnnnnnn  #1#2#3#4#5#6#7 {#2}
+\cs_set:Npn \use_iii:nnnnnnn #1#2#3#4#5#6#7 {#3}
+\cs_set:Npn \use_iv:nnnnnnn  #1#2#3#4#5#6#7 {#4}
+\cs_set:Npn \use_v:nnnnnnn   #1#2#3#4#5#6#7 {#5}
+\cs_set:Npn \use_vi:nnnnnnn  #1#2#3#4#5#6#7 {#6}
+\cs_set:Npn \use_vii:nnnnnnn #1#2#3#4#5#6#7 {#7}
+\cs_set:Npn \use_i:nnnnnnnn    #1#2#3#4#5#6#7#8 {#1}
+\cs_set:Npn \use_ii:nnnnnnnn   #1#2#3#4#5#6#7#8 {#2}
+\cs_set:Npn \use_iii:nnnnnnnn  #1#2#3#4#5#6#7#8 {#3}
+\cs_set:Npn \use_iv:nnnnnnnn   #1#2#3#4#5#6#7#8 {#4}
+\cs_set:Npn \use_v:nnnnnnnn    #1#2#3#4#5#6#7#8 {#5}
+\cs_set:Npn \use_vi:nnnnnnnn   #1#2#3#4#5#6#7#8 {#6}
+\cs_set:Npn \use_vii:nnnnnnnn  #1#2#3#4#5#6#7#8 {#7}
+\cs_set:Npn \use_viii:nnnnnnnn #1#2#3#4#5#6#7#8 {#8}
+\cs_set:Npn \use_i:nnnnnnnnn    #1#2#3#4#5#6#7#8#9 {#1}
+\cs_set:Npn \use_ii:nnnnnnnnn   #1#2#3#4#5#6#7#8#9 {#2}
+\cs_set:Npn \use_iii:nnnnnnnnn  #1#2#3#4#5#6#7#8#9 {#3}
+\cs_set:Npn \use_iv:nnnnnnnnn   #1#2#3#4#5#6#7#8#9 {#4}
+\cs_set:Npn \use_v:nnnnnnnnn    #1#2#3#4#5#6#7#8#9 {#5}
+\cs_set:Npn \use_vi:nnnnnnnnn   #1#2#3#4#5#6#7#8#9 {#6}
+\cs_set:Npn \use_vii:nnnnnnnnn  #1#2#3#4#5#6#7#8#9 {#7}
+\cs_set:Npn \use_viii:nnnnnnnnn #1#2#3#4#5#6#7#8#9 {#8}
+\cs_set:Npn \use_ix:nnnnnnnnn   #1#2#3#4#5#6#7#8#9 {#9}
 \cs_set:Npn \use_ii_i:nn #1#2 { #2 #1 }
 \cs_set:Npn \use_none_delimit_by_q_nil:w  #1 \q_nil  { }
 \cs_set:Npn \use_none_delimit_by_q_stop:w #1 \q_stop { }
@@ -3874,7 +3909,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   { \prg_map_break:Nn \tl_map_break: { } }
 \cs_new:Npn \tl_map_break:n
   { \prg_map_break:Nn \tl_map_break: }
-\cs_generate_variant:Nn \tl_to_str:n { V }
+\cs_generate_variant:Nn \tl_to_str:n { V , v }
 \cs_new:Npn \tl_to_str:N #1 { \__kernel_tl_to_str:w \exp_after:wN {#1} }
 \cs_generate_variant:Nn \tl_to_str:N { c }
 \cs_new:Npn \tl_use:N #1
@@ -5127,6 +5162,8 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
           }
       }
   }
+\cs_new:Npn \str_mdfive_hash:n #1 { \tex_mdfivesum:D { \tl_to_str:n {#1} } }
+\cs_new:Npn \str_mdfive_hash:e #1 { \tex_mdfivesum:D {#1} }
 \str_const:Nx \c_ampersand_str   { \cs_to_str:N \& }
 \str_const:Nx \c_atsign_str      { \cs_to_str:N \@ }
 \str_const:Nx \c_backslash_str   { \cs_to_str:N \\ }
@@ -6211,6 +6248,14 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       \prg_return_false:
     \fi:
   }
+\prg_new_conditional:Npnn \int_if_zero:n #1 { p , T , F , TF }
+  {
+    \if_int_compare:w \__int_eval:w #1 = \c_zero_int
+      \prg_return_true:
+    \else:
+      \prg_return_false:
+    \fi:
+  }
 \cs_new:Npn \int_case:nnTF #1
   {
     \exp:w
@@ -10258,6 +10303,8 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   { Cannot~generate~null~char~as~a~space. }
 \msg_new:nnn { char } { out-of-range }
   { Charcode~requested~out~of~engine~range. }
+\msg_new:nnn { dim } { zero-unit }
+  { Zero~unit~in~conversion. }
 \msg_new:nnnn { kernel } { quote-in-shell }
   { Quotes~in~shell~command~'#1'. }
   { Shell~commands~cannot~contain~quotes~("). }
@@ -10470,7 +10517,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
 \prop_gput:Nnn \g_msg_module_type_prop { kernel } { }
 \clist_map_inline:nn
   {
-    char , clist , coffin , debug , deprecation , msg ,
+    char , clist , coffin , debug , deprecation , dim, msg ,
     quark , prg , prop , scanmark , seq , sys
   }
   {
@@ -12276,18 +12323,105 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
           { #1 . #2 }
           { #1 }
       }
-\cs_new:Npn \dim_to_decimal_in_bp:n #1
-  { \dim_to_decimal:n { ( #1 ) * 800 / 803 } }
 \cs_new:Npn \dim_to_decimal_in_sp:n #1
   { \int_value:w \__dim_eval:w #1 \__dim_eval_end: }
-\cs_new:Npn \dim_to_decimal_in_unit:nn #1#2
+\group_begin:
+  \cs_set_protected:Npn \__dim_tmp:w #1#2
+    {
+      \cs_new:cpn { dim_to_decimal_in_ #1 :n } ##1
+        {
+          \exp_after:wN \__dim_to_decimal_aux:w
+            \int_value:w \__dim_eval:w ##1 \__dim_eval_end: ; #2 ;
+        }
+    }
+  \__dim_tmp:w { in } {   50 /  7227 } % delta = 7227/100
+  \__dim_tmp:w { pc } {    1 /    24 } % delta = 12/1
+  \__dim_tmp:w { cm } {  127 /  7227 } % delta = 7227/254
+  \__dim_tmp:w { mm } { 1270 /  7227 } % delta = 7227/2540
+  \__dim_tmp:w { bp } {  400 /   803 } % delta = 7227/7200
+  \__dim_tmp:w { dd } { 1157 /  2476 } % delta = 1238/1157
+  \__dim_tmp:w { cc } { 1157 / 29712 } % delta = 14856/1157
+\group_end:
+\cs_new:Npn \__dim_to_decimal_aux:w #1#2 ; #3 ;
   {
     \dim_to_decimal:n
       {
-        1pt *
-        \dim_ratio:nn {#1} {#2}
+        \int_eval:n
+          { ( 2 * #1#2 \if:w #1 - - \else: + \fi: 1 ) * #3 }
+        sp
+      }
+  }
+\cs_new:Npn \dim_to_decimal_in_unit:nn #1#2
+  {
+    \exp_after:wN \__dim_chk_unit:w
+      \int_value:w \__dim_eval:w #2 \__dim_eval_end: ; {#1}
+  }
+\cs_new:Npn \__dim_chk_unit:w #1#2;#3
+  {
+    \token_if_eq_charcode:NNTF #1 0
+      { \msg_expandable_error:nn { dim } { zero-unit } }
+      {
+        \exp_after:wN \__dim_branch_unit:w
+          \int_value:w \if:w #1 - - \fi: \__dim_eval:w #3 \exp_after:wN ;
+          \int_value:w \if:w #1 - - \fi: #1#2 ;
       }
   }
+\cs_new:Npn \__dim_branch_unit:w #1;#2;
+  {
+    \int_compare:nNnTF {#2} > { 65536 }
+      { \__dim_to_decimal_aux:w #1 ; 32768 / #2 ; }
+      {
+        \int_compare:nNnTF {#2} = { 65536 }
+          { \dim_to_decimal:n { #1sp } }
+          { \__dim_get_quotient:w #1 ; #2 ; }
+      }
+  }
+\cs_new:Npn \__dim_get_quotient:w #1#2;#3;
+  {
+    \token_if_eq_charcode:NNTF #1 0
+      { 0 }
+      {
+        \token_if_eq_charcode:NNTF #1 -
+          {
+            \exp_after:wN \exp_after:wN \exp_after:wN \__dim_get_remainder:w
+              \int_eval:w ( 2 * #2 - #3 ) / ( 2 * #3 ) ;
+              #2 ; #3 ; - ;
+          }
+          {
+            \exp_after:wN \exp_after:wN \exp_after:wN \__dim_get_remainder:w
+              \int_eval:w ( 2 * #1#2 - #3 ) / ( 2 * #3 ) ;
+              #1#2 ; #3 ; ;
+          }
+      }
+  }
+\cs_new:Npn \__dim_get_remainder:w #1;#2;#3;
+  {
+    \exp_after:wN \exp_after:wN \exp_after:wN \__dim_convert_remainder:w
+      \int_eval:w #2 - #1 * #3 ;
+      #3 ; #1 ;
+  }
+\cs_new:Npn \__dim_convert_remainder:w #1;#2;
+  {
+    \exp_after:wN \exp_after:wN \exp_after:wN \__dim_test_candidate:w
+      \int_eval:w #1 * 65536 / #2 ;
+      #1 ; #2 ;
+  }
+\cs_new:Npn \__dim_test_candidate:w #1;#2;#3;
+  {
+    \dim_compare:nNnTF { #2sp } =
+      { \dim_to_decimal:n { #1sp } \__dim_eval:w #3sp \__dim_eval_end: }
+      { \__dim_parse_decimal:w #1 ; }
+      {
+        \exp_after:wN \__dim_parse_decimal:w
+          \int_eval:w #1 + 1 ;
+      }
+  }
+\cs_new:Npn \__dim_parse_decimal:w #1;#2;#3;
+  {
+    \exp_after:wN \__dim_parse_decimal_aux:w
+      \int_value:w #3 \int_eval:w #2 + \dim_to_decimal:n { #1sp } ;
+  }
+\cs_new:Npn \__dim_parse_decimal_aux:w #1 ; {#1}
 \cs_new_eq:NN  \dim_show:N \__kernel_register_show:N
 \cs_generate_variant:Nn \dim_show:N { c }
 \cs_new_protected:Npn \dim_show:n
@@ -12829,7 +12963,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
     \__keys_cmd_set_direct:nn { \l_keys_path_str / unknown }
       {
         \msg_error:nnx { keys } { boolean-values-only }
-          \l_keys_key_str
+          \l_keys_path_str
       }
     \__keys_default_set:n { true }
   }
@@ -12942,7 +13076,13 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       {
         \str_clear:N \l__keys_inherit_str
         \cs_if_exist:cT { \c__keys_code_root_str \l_keys_path_str }
-          { \__keys_execute:nn \l_keys_path_str {#1} }
+          {
+            \exp_after:wN \__keys_find_key_module:wNN
+              \l_keys_path_str \s__keys_stop
+                \l_keys_key_tl \l_keys_key_str
+            \tl_set_eq:NN \l_keys_key_tl \l_keys_key_str
+            \__keys_execute:nn \l_keys_path_str {#1}
+          }
       }
   }
 \cs_new_protected:Npn \__keys_legacy_if_set:nn #1#2
@@ -12959,7 +13099,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
     \__keys_cmd_set:nn { \l_keys_path_str / unknown }
       {
         \msg_error:nnx { keys } { boolean-values-only }
-          \l_keys_key_str
+          \l_keys_path_str
       }
     \__keys_default_set:n { true }
     \cs_if_exist:cF { if#1 }
@@ -12972,14 +13112,14 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   {
     \exp_args:NVo \__keys_cmd_set_direct:nn \l_keys_path_str
       {
-        \exp_after:wN \keys_set:nn \exp_after:wN
+        \exp_after:wN \__keys_set:nn \exp_after:wN
           { \l__keys_module_str } {#1}
       }
   }
 \cs_new_protected:Npn \__keys_meta_make:nn #1#2
   {
     \exp_args:NV \__keys_cmd_set_direct:nn
-      \l_keys_path_str { \keys_set:nn {#1} {#2} }
+      \l_keys_path_str { \__keys_set:nn {#1} {#2} }
   }
 \cs_new_protected:Npn \__keys_prop_put:Nn #1#2
   {
@@ -22070,14 +22210,14 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   }
 \prg_new_conditional:Npnn \__str_if_escape_url:n #1 { TF }
   {
-    \if_int_compare:w `#1 < "41 \exp_stop_f:
-      \__str_if_contains_char:nnTF { "-.<> } {#1}
+    \if_int_compare:w `#1 < "30 \exp_stop_f:
+      \__str_if_contains_char:nnTF { "-. } {#1}
         \prg_return_true: \prg_return_false:
     \else:
       \if_int_compare:w `#1 > "7E \exp_stop_f:
         \prg_return_false:
       \else:
-        \__str_if_contains_char:nnTF { [ ] } {#1}
+        \__str_if_contains_char:nnTF { : ; = ? @ [ ] } {#1}
           \prg_return_false: \prg_return_true:
       \fi:
     \fi:
@@ -30114,7 +30254,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
             \color_ensure_current:
             #2
           }
-        \__coffin_update:N #1
+        \coffin_reset_poles:N #1
       }
   }
 \cs_generate_variant:Nn \hcoffin_set:Nn { c }
@@ -30127,20 +30267,20 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
             \color_ensure_current:
             #2
           }
-        \__coffin_gupdate:N #1
+        \coffin_greset_poles:N #1
       }
   }
 \cs_generate_variant:Nn \hcoffin_gset:Nn { c }
 \cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3
   {
     \__coffin_set_vertical:NnnNN #1 {#2} {#3}
-      \vbox_set:Nn \__coffin_update:N
+      \vbox_set:Nn \coffin_reset_poles:N
   }
 \cs_generate_variant:Nn \vcoffin_set:Nnn { c }
 \cs_new_protected:Npn \vcoffin_gset:Nnn #1#2#3
   {
     \__coffin_set_vertical:NnnNN #1 {#2} {#3}
-      \vbox_gset:Nn \__coffin_gupdate:N
+      \vbox_gset:Nn \coffin_greset_poles:N
   }
 \cs_generate_variant:Nn \vcoffin_gset:Nnn { c }
 \cs_new_protected:Npn \__coffin_set_vertical:NnnNN #1#2#3#4#5
@@ -30186,7 +30326,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
           \cs_set_protected:Npn \hcoffin_set_end:
             {
               \hbox_set_end:
-              \__coffin_update:N #1
+              \coffin_reset_poles:N #1
             }
       }
   }
@@ -30199,7 +30339,7 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
           \cs_set_protected:Npn \hcoffin_gset_end:
             {
               \hbox_gset_end:
-              \__coffin_gupdate:N #1
+              \coffin_greset_poles:N #1
             }
       }
   }
@@ -30210,14 +30350,14 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   {
     \__coffin_set_vertical:NnNNNNw #1 {#2} \vbox_set:Nw
       \vcoffin_set_end:
-      \vbox_set_end: \__coffin_update:N
+      \vbox_set_end: \coffin_reset_poles:N
   }
 \cs_generate_variant:Nn \vcoffin_set:Nnw { c }
 \cs_new_protected:Npn \vcoffin_gset:Nnw #1#2
   {
     \__coffin_set_vertical:NnNNNNw #1 {#2} \vbox_gset:Nw
       \vcoffin_gset_end:
-      \vbox_gset_end: \__coffin_gupdate:N
+      \vbox_gset_end: \coffin_greset_poles:N
   }
 \cs_generate_variant:Nn \vcoffin_gset:Nnw { c }
 \cs_new_protected:Npn \__coffin_set_vertical:NnNNNNw #1#2#3#4#5#6
@@ -30351,13 +30491,13 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       {#2} {#3}
   }
 \cs_generate_variant:Nn \__coffin_set_pole:Nnn { Nnx }
-\cs_new_protected:Npn \__coffin_update:N #1
+\cs_new_protected:Npn \coffin_reset_poles:N #1
   {
     \__coffin_reset_structure:N #1
     \__coffin_update_corners:N #1
     \__coffin_update_poles:N #1
   }
-\cs_new_protected:Npn \__coffin_gupdate:N #1
+\cs_new_protected:Npn \coffin_greset_poles:N #1
   {
     \__coffin_greset_structure:N #1
     \__coffin_gupdate_corners:N #1
@@ -31975,7 +32115,13 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
       { \token_if_mathchardef_p:N #1 }
       {
         \char_generate:nn {#1}
-          { \char_value_catcode:n {#1} }
+          {
+            \if_int_compare:w \char_value_catcode:n {#1} = 10 \exp_stop_f:
+              10
+            \else:
+              12
+            \fi:
+          }
       }
       {#1}
   }
@@ -32295,63 +32441,10 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
     \__text_expand_store:n { ~ }
     \__text_expand_loop:w
   }
-\cs_new:Npx \__text_expand_N_type:N #1
-  {
-    \exp_not:N \__text_if_s_recursion_tail_stop_do:Nn #1
-      { \exp_not:N \__text_expand_end:w }
-    \exp_not:N \bool_lazy_any:nTF
-      {
-        { \exp_not:N \token_if_eq_meaning_p:NN #1 \c_space_token }
-        {
-          \exp_not:N \token_if_eq_meaning_p:NN #1
-            \c__text_chardef_space_token
-        }
-        {
-          \exp_not:N \token_if_eq_meaning_p:NN #1
-            \c__text_mathchardef_space_token
-        }
-      }
-      { \exp_not:N \__text_expand_space:w \c_space_tl }
-      { \exp_not:N \__text_expand_N_type_auxi:N #1 }
-  }
-\cs_new:Npn \__text_expand_N_type_auxi:N #1
-  {
-    \bool_lazy_or:nnTF
-      { \token_if_eq_meaning_p:NN #1 \c__text_chardef_group_begin_token }
-      { \token_if_eq_meaning_p:NN #1 \c__text_mathchardef_group_begin_token }
-      {
-        \__text_expand_store:o \c_left_brace_str
-        \__text_expand_loop:w
-      }
-      {
-        \bool_lazy_or:nnTF
-          { \token_if_eq_meaning_p:NN #1 \c__text_chardef_group_end_token }
-          { \token_if_eq_meaning_p:NN #1 \c__text_mathchardef_group_end_token }
-          {
-            \__text_expand_store:o \c_right_brace_str
-            \__text_expand_loop:w
-          }
-          { \__text_expand_N_type_auxii:N #1 }
-      }
-  }
-\cs_new:Npn \__text_expand_N_type_auxii:N #1
-  {
-    \token_if_eq_meaning:NNTF #1 \c_group_begin_token
-      {
-        { \if_false: } \fi:
-        \__text_expand_loop:w
-      }
-      {
-        \token_if_eq_meaning:NNTF #1 \c_group_end_token
-          {
-            \if_false: { \fi: }
-            \__text_expand_loop:w
-          }
-          { \__text_expand_N_type_auxiii:N #1 }
-      }
-  }
-\cs_new:Npn \__text_expand_N_type_auxiii:N #1
+\cs_new:Npn \__text_expand_N_type:N #1
   {
+    \__text_if_s_recursion_tail_stop_do:Nn #1
+      { \__text_expand_end:w }
     \exp_after:wN \__text_expand_math_search:NNN
       \exp_after:wN #1 \l_text_math_delims_tl
       \q__text_recursion_tail \q__text_recursion_tail
@@ -32386,7 +32479,8 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
   {
     \__text_if_s_recursion_tail_stop_do:Nn #2
       { \__text_expand_end:w }
-    \__text_expand_store:n {#2}
+    \token_if_eq_meaning:NNF #2 \exp_not:N
+      { \__text_expand_store:n {#2} }
     \token_if_eq_meaning:NNTF #2 #1
       { \__text_expand_loop:w }
       { \__text_expand_math_loop:Nw #1 }
@@ -34654,20 +34748,24 @@ Type  H <return>  for immediate help}\def~{\errmessage{%
           { \token_if_active_p:N #1 }
       }
       {
-        \exp_args:Nv \__text_purify_replace:n
+        \exp_args:Nv \__text_purify_replace_auxi:n
           { l__text_purify_ \token_to_str:N #1 _tl }
       }
       {
-        \token_if_cs:NTF #1
-          { \__text_purify_expand:N #1 }
-          {
-            \exp_args:Ne \__text_purify_store:n
-              { \__text_token_to_explicit:N #1 }
-            \__text_purify_loop:w
-          }
+        \exp_args:Ne \__text_purify_replace_auxii:n
+          { \__text_token_to_explicit:N #1 }
+      }
+  }
+\cs_new:Npn \__text_purify_replace_auxi:n #1 { \__text_purify_loop:w #1 }
+\cs_new:Npn \__text_purify_replace_auxii:n #1
+  {
+    \token_if_cs:NTF #1
+      { \__text_purify_expand:N #1 }
+      {
+        \__text_purify_store:n {#1}
+        \__text_purify_loop:w
       }
   }
-\cs_new:Npn \__text_purify_replace:n #1 { \__text_purify_loop:w #1 }
 \cs_new:Npn \__text_purify_expand:N #1
   {
     \str_if_eq:nnTF {#1} { \protect }
diff --git a/texmf/tex/latex/l3kernel/expl3-generic.tex b/texmf/tex/latex/l3kernel/expl3-generic.tex
index 8cfb6fcc..e70248e7 100644
--- a/texmf/tex/latex/l3kernel/expl3-generic.tex
+++ b/texmf/tex/latex/l3kernel/expl3-generic.tex
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-05-15}%
+\def\ExplFileDate{2023-05-22}%
 \let\ExplLoaderFileDate\ExplFileDate
 \begingroup
   \catcode`\_=11
diff --git a/texmf/tex/latex/l3kernel/expl3.ltx b/texmf/tex/latex/l3kernel/expl3.ltx
index 0d0af2b2..6db890f6 100644
--- a/texmf/tex/latex/l3kernel/expl3.ltx
+++ b/texmf/tex/latex/l3kernel/expl3.ltx
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-05-15}%
+\def\ExplFileDate{2023-05-22}%
 \let\ExplLoaderFileDate\ExplFileDate
 \begingroup
   \catcode`\_=11
diff --git a/texmf/tex/latex/l3kernel/expl3.sty b/texmf/tex/latex/l3kernel/expl3.sty
index ea9ae807..d89673f8 100644
--- a/texmf/tex/latex/l3kernel/expl3.sty
+++ b/texmf/tex/latex/l3kernel/expl3.sty
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: expl3.dtx
-\def\ExplFileDate{2023-05-15}%
+\def\ExplFileDate{2023-05-22}%
 \let\ExplLoaderFileDate\ExplFileDate
 \ProvidesPackage{expl3}
   [%





More information about the latex3-commits mailing list.