[latex3-commits] [git/LaTeX3-latex3-latex2e] case-lang: Auto-detect babel locale (639e7611)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Oct 19 14:28:57 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : case-lang
Link       : https://github.com/latex3/latex2e/commit/639e7611253538c2fd19f7b9425b87ed90778be2

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

commit 639e7611253538c2fd19f7b9425b87ed90778be2
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 19 13:17:14 2022 +0100

    Auto-detect babel locale


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

639e7611253538c2fd19f7b9425b87ed90778be2
 base/changes.txt                           |  4 ++++
 base/doc/ltnews36.tex                      |  4 +++-
 base/ltfinal.dtx                           | 33 ++++++++++++++++++++++++------
 base/testfiles/tlb-rollback-005.luatex.tlg |  4 ++--
 base/testfiles/tlb-rollback-005.tlg        |  4 ++--
 base/testfiles/tlb-rollback-005.xetex.tlg  |  4 ++--
 6 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 4dc5097e..b645e67d 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2022-10-19  Joseph Wright  <Joseph.Wright at latex-project.org>
+
+	* ltfinal.dtx: Auto-detect babel locale for case changing
+
 2022-10-18  Joseph Wright  <Joseph.Wright at latex-project.org>
 
 	* ltfinal.dtx:
diff --git a/base/doc/ltnews36.tex b/base/doc/ltnews36.tex
index 2bd4941b..7c3c363b 100644
--- a/base/doc/ltnews36.tex
+++ b/base/doc/ltnews36.tex
@@ -211,7 +211,9 @@ glyphs that are actually available in the font.\footnote{The \LaTeX{}
 \subsection{Better language handling for case-changing commands}
 
 The commands \cs{MakeUppercase}, \cs{MakeLowercase} and \cs{MakeTitlecase}
-now accept a leading optional argument. This accepts a key--value list of
+now automatically detect the locale currently in use when \pkg{babel} is
+loaded. This allows automatic adjustment of letter mappings where appropriate.
+They also accept a leading optional argument. This accepts a key--value list of
 control settings. At present, there are two keys available, bot of which
 provide equivalent functionality: \texttt{lang} and \texttt{bcp47}. These
 are intended to allow local setting of the language, which can be done using
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 4641ff1c..67b1f10b 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -1087,6 +1087,7 @@
 % \changes{v2.2w}{2022/07/04}{Introduced \cs{CaseSwitch}, \cs{DeclareCaseChangeEquivalent} and \cs{MakeTitlecase} to support hooking into case changing gh/889}%
 % \changes{v2.2x}{2022/10/18}{Introduce optional argument for case-changing commands}
 % \changes{v2.2x}{2022/10/18}{Make case changing commands language-aware}
+% \changes{v2.2x}{2022/10/19}{Auto-detect \pkg{babel} locale}
 % Wrappers around the L3 case changing functions.
 % |\protected| to make them mostly safe as replacements for |uppercase|
 % and |\lowercase|.  
@@ -1120,17 +1121,37 @@
     bcp47 .str_set:N = \reserved at a ,
     lang  .str_set:N = \reserved at a
   }
+\cs_new_protected:Npn \@@text at case@aux #1#2#3
+  {
+    \cs_set_nopar:Npn \reserved at a { }
+    \tl_if_blank:nTF {#2}
+      { \@@text at case@aux@ }
+      { \keys_set:nn { __kernel } {#2} }
+    \use:c { text_ #1 case:Vn } \reserved at a {#3}
+  }
+\cs_new_protected:Npn \@@text at case@aux@ { }
+\tl_gput_right:Nn \@kernel at after@begindocument
+  {
+    \@ifpackageloaded { babel }
+      {
+        \@ifpackagelater { babel } { 2020-01-15 }
+          {
+            \cs_gset_protected:Npn \@@text at case@aux@
+              {
+                \str_set:Nx \reserved at a
+                  { \localinfo* { tag.bcp47 } }
+              }
+          }
+          { }
+      }
+      { }
+  }
 \exp_args_generate:n { cnx }
 \cs_set_protected:Npn \reserved at a #1
   {
     \cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
     \cs_new_protected:cpx { Make#1case \c_space_tl \c_space_tl \c_space_tl } [##1] ##2
-      {
-        \cs_set_nopar:Npn \exp_not:N \reserved at a { }
-        \keys_set:nn { __kernel } {##1}
-        \exp_not:c { text_ \str_lowercase:n {#1} case:Vn }
-          \exp_not:N \reserved at a {##2}
-      }
+      { \exp_not:N \@@text at case@aux { \str_lowercase:n {#1} } {##1} {##2} }
      \ExpandArgs { cnx } \NewExpandableDocumentCommand
        { Make#1case }
        { O{} +m }
diff --git a/base/testfiles/tlb-rollback-005.luatex.tlg b/base/testfiles/tlb-rollback-005.luatex.tlg
index 9fd5d02a..f207f74f 100644
--- a/base/testfiles/tlb-rollback-005.luatex.tlg
+++ b/base/testfiles/tlb-rollback-005.luatex.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                 \makeatother
 (latexrelease.sty
@@ -744,7 +744,7 @@ Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                  \makeatother
 (minimal.cls
diff --git a/base/testfiles/tlb-rollback-005.tlg b/base/testfiles/tlb-rollback-005.tlg
index a6aee695..cf8eddd4 100644
--- a/base/testfiles/tlb-rollback-005.tlg
+++ b/base/testfiles/tlb-rollback-005.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (latexrelease.sty
@@ -1169,7 +1169,7 @@ Now handling font encoding U ...
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ......eatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (minimal.cls
diff --git a/base/testfiles/tlb-rollback-005.xetex.tlg b/base/testfiles/tlb-rollback-005.xetex.tlg
index e871d581..cec07a58 100644
--- a/base/testfiles/tlb-rollback-005.xetex.tlg
+++ b/base/testfiles/tlb-rollback-005.xetex.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ...\makeatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (latexrelease.sty
@@ -741,7 +741,7 @@ Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
 > \@kernel at after@begindocument=macro:
-->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: .
+->\prop_map_inline:Nn \l_keys_usage_preamble_prop {\clist_map_inline:nn {##2}{\keys_define:nn {##1}{####1.code:n=\msg_error:nnn {keys}{preamble-only}{####1}}}}\__hook_cmd_begindocument_code: \bool_gset_true:N \g__pdf_init_bool \group_begin: \cs_set_protected:Npn \__text_tmp:w ##1{\tl_clear:N \l_text_expand_exclude_tl \tl_map_inline:nn {##1}{\bool_lazy_any:nF {{\token_if_protected_macro_p:N ####1}{\token_if_protected_long_macro_p:N ####1}{\str_if_eq_p:ee {\cs_replacement_spec:N ####1}{\exp_not:n {\protect ####1}\c_space_tl }}}{\tl_put_right:Nn \l_text_expand_exclude_tl {####1}}}}\exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl \exp_args:NNNV \group_end: \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl \group_begin: \cs_set_protected:Npn \__text_change_case_setup:Nn ##1##2{\quark_if_recursion_tail_stop:N ##1\tl_if_single_token:nT {##2}{\cs_if_exist:cF {c__text_uppercase_\token_to_str:N ##1_tl}{\tl_const:cn {c__text_uppercase_\token_to_str:N ##1_tl}{##2}}\cs_if_exist:cF {c__text_lowercase_\token_to_str:N ##2_tl}{\tl_const:cn {c__text_lowercase_\token_to_str:N ##2_tl}{##1}}}\__text_change_case_setup:Nn }\exp_after:wN \__text_change_case_setup:Nn \@uclclist \q_recursion_tail ?\q_recursion_stop \group_end: \@ifpackageloaded {babel}{\@ifpackagelater {babel}{....-..-..}{\cs_gset_protected:Npn \@@text at case@aux@ {\str_set:Nx \reserved at a {\localinfo *{tag.bcp47}}}}{}}{}.
 l. ......eatletter\show\@kernel at after@begindocument
                                                   \makeatother
 (minimal.cls





More information about the latex3-commits mailing list.