[latex3-commits] [git/LaTeX3-latex3-latex3] main: Another place to use \codepoint_generate:nn (6bb6a35bb)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Feb 7 08:57:25 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/6bb6a35bbdba3fad2cc2b6de241a333af2c8aca7

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

commit 6bb6a35bbdba3fad2cc2b6de241a333af2c8aca7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Feb 7 07:57:25 2023 +0000

    Another place to use \codepoint_generate:nn


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

6bb6a35bbdba3fad2cc2b6de241a333af2c8aca7
 l3kernel/l3text-purify.dtx | 37 ++++++-------------------------------
 1 file changed, 6 insertions(+), 31 deletions(-)

diff --git a/l3kernel/l3text-purify.dtx b/l3kernel/l3text-purify.dtx
index 07c1d3f78..bdf7f876e 100644
--- a/l3kernel/l3text-purify.dtx
+++ b/l3kernel/l3text-purify.dtx
@@ -464,40 +464,15 @@
 % gets converted to two letters. (At some stage an alternative version
 % can presumably be added to \pkg{babel} or similar.)
 %    \begin{macrocode}
-\bool_lazy_or:nnTF
-  { \sys_if_engine_luatex_p: }
-  { \sys_if_engine_xetex_p: }
+\cs_set_protected:Npn \@@_loop:Nn #1#2
   {
-    \cs_set_protected:Npn \@@_loop:Nn #1#2
+    \quark_if_recursion_tail_stop:N #1
+    \text_declare_purify_equivalent:Nx #1
       {
-        \quark_if_recursion_tail_stop:N #1
-        \text_declare_purify_equivalent:Nx #1
-          {
-            \char_generate:nn { "#2 }
-              { \char_value_catcode:n { "#2 } }
-          }
-        \@@_loop:Nn
-      }
-  }
-  {
-    \cs_set_protected:Npn \@@_loop:Nn #1#2
-      {
-        \quark_if_recursion_tail_stop:N #1
-        \text_declare_purify_equivalent:Nx #1
-          {
-            \exp_args:Ne \@@_tmp:n
-              { \__kernel_codepoint_to_bytes:n { "#2 } }
-          }
-        \@@_loop:Nn
-      }
-    \cs_set:Npn \@@_tmp:n #1 { \@@_tmp:nnnn #1 }
-    \cs_set:Npn \@@_tmp:nnnn #1#2#3#4
-      {
-        \exp_after:wN \exp_after:wN \exp_after:wN
-          \exp_not:N \char_generate:nn {#1} { 13 }
-        \exp_after:wN \exp_after:wN \exp_after:wN
-          \exp_not:N \char_generate:nn {#2} { 13 }
+        \codepoint_generate:nn {"#2}
+          { \char_value_catcode:n {"#2} }
       }
+    \@@_loop:Nn
   }
 \@@_loop:Nn
   \AA { 00C5 }





More information about the latex3-commits mailing list.