[latex3-commits] [git/LaTeX3-latex3-latex2e] keyval-detect: Simplify a bit (12ef12a3)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Aug 31 08:27:16 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : keyval-detect
Link       : https://github.com/latex3/latex2e/commit/12ef12a3297b9a5fba932395e322fcf5f3eff291

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

commit 12ef12a3297b9a5fba932395e322fcf5f3eff291
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Mon Aug 29 16:30:53 2022 -0300

    Simplify a bit


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

12ef12a3297b9a5fba932395e322fcf5f3eff291
 base/ltcmd.dtx | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index d4944fca..6776ae58 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -4046,19 +4046,15 @@
     \tl_if_head_is_N_type:nTF {#3}
       { \@@_arg_to_keyvalue_loop_N_type:nnN }
       {
-         \tl_if_head_is_group:nTF {#3}
-           { \@@_arg_to_keyvalue_loop_group:nnn }
-           { \@@_arg_to_keyvalue_loop_space:nnw }
+        \tl_if_head_is_group:nTF {#3}
+          { \@@_arg_to_keyvalue_loop_group:nnn }
+          { \@@_arg_to_keyvalue_loop_space:nnw }
       }
         {#1} {#2} #3 \q_recursion_stop
   }
 \cs_new_protected:Npn \@@_arg_to_keyvalue_loop_group:nnn #1#2#3
   { \@@_arg_to_keyvalue_loop:nnw {#1} {#2} }
-\use:x
-  {
-    \cs_new_protected:Npn
-      \exp_not:N \@@_arg_to_keyvalue_loop_space:nnw ##1##2 \c_space_tl
-  }
+\cs_new_protected:Npn \@@_arg_to_keyvalue_loop_space:nnw #1#2 ~
   { \@@_arg_to_keyvalue_loop:nnw {#1} {#2} }
 \cs_new_protected:Npn \@@_arg_to_keyvalue_loop_N_type:nnN #1#2#3
   {
@@ -4083,9 +4079,9 @@
     \tl_if_head_is_N_type:nTF {#3}
       { \@@_arg_to_keyvalue_math_N_type:nnN }
       {
-         \tl_if_head_is_group:nTF {#3}
-           { \@@_arg_to_keyvalue_math_group:nnn }
-           { \@@_arg_to_keyvalue_math_space:nnw }
+        \tl_if_head_is_group:nTF {#3}
+          { \@@_arg_to_keyvalue_math_group:nnn }
+          { \@@_arg_to_keyvalue_math_space:nnw }
       }
         {#1} {#2} #3 \q_recursion_stop
   }
@@ -4101,11 +4097,7 @@
   }
 \cs_new_protected:Npn \@@_arg_to_keyvalue_math_group:nnn #1#2#3
   { \@@_arg_to_keyvalue_math:nnw {#1} {#2} }
-\use:x
-  {
-    \cs_new_protected:Npn
-      \exp_not:N \@@_arg_to_keyvalue_loop_math:nnw ##1##2 \c_space_tl
-  }
+\cs_new_protected:Npn \@@_arg_to_keyvalue_loop_math:nnw #1#2 ~
   { \@@_arg_to_keyvalue_math:nnw {#1} {#2} }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list.