[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Simplify __quark_new_test_define_ifx auxiliary and correct several signatures (c65dd4f87)

Bruno Le Floch bruno at le-floch.fr
Thu May 7 00:07:35 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : scan-quark
Link       : https://github.com/latex3/latex3/commit/c65dd4f879bc71f3ae86beaf958880e8dea71276

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

commit c65dd4f879bc71f3ae86beaf958880e8dea71276
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Thu May 7 00:07:35 2020 +0200

    Simplify __quark_new_test_define_ifx auxiliary and correct several signatures


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

c65dd4f879bc71f3ae86beaf958880e8dea71276
 l3kernel/l3quark.dtx | 68 ++++++++++++++++++++++++++--------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index 025f35d50..2587ef7a3 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -698,53 +698,54 @@
 %     \@@_new_test_NN:Nnnn, \@@_new_test_NN:Nnnn,
 %   }
 %   These macros implement the six possibilities mentioned above, passing
-%   the right arguments to \cs{@@_new_test_aux_do:nNNnnnnN},
+%   the right arguments to \cs{@@_new_test_aux_do:nNNnnnnNNn},
 %   which defines some auxiliaries, and then to
-%   \cs{@@_new_test_define_tl:nNNNNn} (|:n(n)| variants) or to
-%   \cs{@@_new_test_define_ifx:nNNNNn} (|:N(n)|) which define the
+%   \cs{@@_new_test_define_tl:nNnNNn} (|:n(n)| variants) or to
+%   \cs{@@_new_test_define_ifx:nNnNNn} (|:N(n)|) which define the
 %   main conditionals.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_new_test_n:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { none } { } { } { }
-      \@@_new_test_define_tl:nNNNNn #1 { }
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { none } { } { } { }
+      \@@_new_test_define_tl:nNnNNn #1 { }
   }
 \cs_new_protected:Npn \@@_new_test_nn:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { i } { n } {##1} {##2}
-      \@@_new_test_define_tl:nNNNNn #1 { \use_none:n }
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2}
+      \@@_new_test_define_tl:nNnNNn #1 { \use_none:n }
   }
 \cs_new_protected:Npn \@@_new_test_nN:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { i } { n } {##1} {##2}
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2}
       \@@_new_test_define_break_tl:nNNNNn #1 { }
   }
 \cs_new_protected:Npn \@@_new_test_N:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { none } { } { } { }
-      \@@_new_test_define_ifx:nNNNNn #1 { }
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { none } { } { } { }
+      \@@_new_test_define_ifx:nNnNNn #1 { }
   }
 \cs_new_protected:Npn \@@_new_test_Nn:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { i } { n } {##1} {##2}
-      \@@_new_test_define_ifx:nNNNNn #1 { \use_none:n }
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2}
+      \@@_new_test_define_ifx:nNnNNn #1
+      { \else: \exp_after:wN \use_none:n }
   }
 \cs_new_protected:Npn \@@_new_test_NN:Nnnn #1 #2 #3 #4
   {
-    \@@_new_test_aux_do:nNNnnnnN {#4} #2 #3 { i } { n } {##1} {##2}
+    \@@_new_test_aux_do:nNNnnnnNNn {#4} #2 #3 { i } { n } {##1} {##2}
       \@@_new_test_define_break_ifx:nNNNNn #1 { }
   }
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{
-%     \@@_new_test_aux_do:nNNnnnnN,
-%     \@@_test_define_aux:NNNNnnN
+%     \@@_new_test_aux_do:nNNnnnnNNn,
+%     \@@_test_define_aux:NNNNnnNNn
 %   }
-%   \cs{@@_new_test_aux_do:nNNnnnnN} makes the control sequence names
-%   which will be used by \cs{@@_test_define_aux:NNNNnnN}, and then later
-%   by \cs{@@_new_test_define_tl:nNNNNn} or
-%   \cs{@@_new_test_define_ifx:nNNNNn}. The control sequences defined
+%   \cs{@@_new_test_aux_do:nNNnnnnNNn} makes the control sequence names
+%   which will be used by \cs{@@_test_define_aux:NNNNnnNNn}, and then later
+%   by \cs{@@_new_test_define_tl:nNnNNn} or
+%   \cs{@@_new_test_define_ifx:nNnNNn}. The control sequences defined
 %   here are analogous to \cs{@@_if_recursion_tail:w} and to
 %   \cs[no-index]{use_(none|i)_delimit_by_q_recursion_stop:(|n)w}.
 %
@@ -760,14 +761,14 @@
 %   Note that the actual quarks are \emph{not} defined here. They should
 %   be defined separately using \cs{quark_new:N}.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_new_test_aux_do:nNNnnnnN #1 #2 #3 #4 #5
+\cs_new_protected:Npn \@@_new_test_aux_do:nNNnnnnNNn #1 #2 #3 #4 #5
   {
-    \exp_args:Ncc \@@_test_define_aux:NNNNnnN
+    \exp_args:Ncc \@@_test_define_aux:NNNNnnNNn
       { #1 _quark_recursion_tail:w }
       { #1 _use_ #4 _delimit_by_q_recursion_stop: #5 w }
       #2 #3
   }
-\cs_new_protected:Npn \@@_test_define_aux:NNNNnnN #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \@@_test_define_aux:NNNNnnNNn #1 #2 #3 #4 #5 #6 #7
   {
     \cs_gset:Npn #1  ##1 #3 ##2 ? ##3 ?! { ##1 ##2 }
     \cs_gset:Npn #2  ##1 #6 #4 {#5}
@@ -777,8 +778,8 @@
 % \end{macro}
 %
 % \begin{macro}{
-%     \@@_new_test_define_tl:nNNNNn,
-%     \@@_new_test_define_ifx:nNNNNn
+%     \@@_new_test_define_tl:nNnNNn,
+%     \@@_new_test_define_ifx:nNnNNn
 %   }
 % \begin{macro}{
 %     \@@_new_test_define_break_tl:nNNNNn,
@@ -787,7 +788,7 @@
 %   Finally, these two macros define the main conditional function using
 %   what's been set up before.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_new_test_define_tl:nNNNNn #1 #2 #3 #4 #5 #6
+\cs_new_protected:Npn \@@_new_test_define_tl:nNnNNn #1 #2 #3 #4 #5 #6
   {
     \cs_new:Npn #5 #1
       {
@@ -796,21 +797,20 @@
           {#3} {#6}
       }
   }
-\cs_new_protected:Npn \@@_new_test_define_ifx:nNNNNn #1 #2 #3 #4 #5 #6
+\cs_new_protected:Npn \@@_new_test_define_ifx:nNnNNn #1 #2 #3 #4 #5 #6
   {
-    \cs_new:Npx #5 #1
+    \cs_new:Npn #5 #1
       {
-        \exp_not:N \if_meaning:w \exp_not:N #4 ##1
-          \exp_not:N \exp_after:wN \exp_not:N #3
-          \tl_if_empty:nF {#6}
-            { \exp_not:n { \else: \exp_after:wN #6 } }
-        \exp_not:N \fi:
+        \if_meaning:w #4 ##1
+          \exp_after:wN #3
+          #6
+        \fi:
       }
   }
 \cs_new_protected:Npn \@@_new_test_define_break_tl:nNNNNn #1 #2 #3
-  { \@@_new_test_define_tl:nNNNNn {##1##2} #2 {##2} }
+  { \@@_new_test_define_tl:nNnNNn {##1##2} #2 {##2} }
 \cs_new_protected:Npn \@@_new_test_define_break_ifx:nNNNNn #1 #2 #3
-  { \@@_new_test_define_ifx:nNNNNn {##1##2} #2 {##2} }
+  { \@@_new_test_define_ifx:nNnNNn {##1##2} #2 {##2} }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}





More information about the latex3-commits mailing list.