From 8b5866024fec68c13a91973cc6cfc2cb5697baba Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Fri, 8 May 2020 03:02:15 +0000
Subject: CTAN sync 202005080302

---
 macros/latex/contrib/l3kernel/l3text-case.dtx | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

(limited to 'macros/latex/contrib/l3kernel/l3text-case.dtx')

diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index cb898633a7..950635ec93 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2020-04-06}
+% \date{Released 2020-05-05}
 %
 % \maketitle
 %
@@ -160,7 +160,7 @@
 % \begin{macro}[EXP]
 %   {\@@_change_case_char_title:nN, \@@_change_case_char_titleonly:nN}
 % \begin{macro}[EXP]{\@@_change_case_char_title:nnnN}
-% \begin{macro}[EXP]{\@@_change_case_char_char:nnnN}
+% \begin{macro}[EXP]{\@@_change_case_char:nnnN, \@@_change_case_char_aux:nnnN}
 % \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nnnNN}
 % \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nnnNNN}
 % \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nnnNNNNN}
@@ -568,19 +568,23 @@
 %   Unicode character, which is then used in a lookup. (As will become
 %   obvious below, there is no intention here of covering all of Unicode.)
 %    \begin{macrocode}
-\bool_lazy_or:nnTF
-  { \sys_if_engine_luatex_p: }
-  { \sys_if_engine_xetex_p: }
+\cs_new:Npn \@@_change_case_char:nnnN #1#2#3#4
   {
-    \cs_new:Npn \@@_change_case_char:nnnN #1#2#3#4
+    \token_if_active:NTF #4
+      { \@@_change_case_store:n {#4} }
       {
         \@@_change_case_store:e
           { \use:c { char_ #1 case :N } #4 }
-        \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3}
       }
+    \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3}
   }
+\bool_lazy_or:nnF
+  { \sys_if_engine_luatex_p: }
+  { \sys_if_engine_xetex_p: }
   {
-    \cs_new:Npn \@@_change_case_char:nnnN #1#2#3#4
+    \cs_new_eq:NN \@@_change_case_char_aux:nnnN
+      \@@_change_case_char:nnnN
+    \cs_gset:Npn \@@_change_case_char:nnnN #1#2#3#4
       {
         \int_compare:nNnTF { `#4 } > { "80 }
           {
@@ -593,10 +597,7 @@
               }
                 {#1} {#2} {#3} #4
           }
-          {
-            \@@_change_case_store:e{ \use:c { char_ #1 case :N } #4 }
-            \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3}
-          }
+          { \@@_change_case_char_aux:nnnN {#1} {#2} {#3} #4 }
        }
     \cs_new:Npn \@@_change_case_char_UTFviii:nnnNN #1#2#3#4#5
       { \@@_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5} }
-- 
cgit v1.2.3

