[latex3-commits] [git/LaTeX3-latex3-latex3] master: Make \quark_if_recursion_tail_break:NN public (a62d832)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Apr 1 21:28:59 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/a62d8320dabbbc79a49513291a4bd696a7ad93b0

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

commit a62d8320dabbbc79a49513291a4bd696a7ad93b0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Apr 1 15:19:44 2018 +0100

    Make \quark_if_recursion_tail_break:NN public
    
    Really goes with the \prg_map_.... changes.


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

a62d8320dabbbc79a49513291a4bd696a7ad93b0
 l3kernel/l3clist.dtx                    |    4 +--
 l3kernel/l3quark.dtx                    |   45 +++++++++++++++----------------
 l3kernel/l3str.dtx                      |    4 +--
 l3kernel/l3tl.dtx                       |    6 ++---
 l3kernel/testfiles/m3expl001.luatex.tlg |    4 +--
 l3kernel/testfiles/m3expl001.ptex.tlg   |    4 +--
 l3kernel/testfiles/m3expl001.tlg        |    4 +--
 l3kernel/testfiles/m3expl001.uptex.tlg  |    4 +--
 l3kernel/testfiles/m3expl001.xetex.tlg  |    4 +--
 l3kernel/testfiles/m3expl003.luatex.tlg |    4 +--
 l3kernel/testfiles/m3expl003.ptex.tlg   |    4 +--
 l3kernel/testfiles/m3expl003.tlg        |    4 +--
 l3kernel/testfiles/m3expl003.uptex.tlg  |    4 +--
 l3kernel/testfiles/m3expl003.xetex.tlg  |    4 +--
 14 files changed, 48 insertions(+), 51 deletions(-)

diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index 4607c23..56b6629 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -1476,7 +1476,7 @@
   }
 \cs_new:Npn \@@_map_function:Nw #1#2 ,
   {
-    \__quark_if_recursion_tail_break:nN {#2} \clist_map_break:
+    \quark_if_recursion_tail_break:nN {#2} \clist_map_break:
     #1 {#2}
     \@@_map_function:Nw #1
   }
@@ -1506,7 +1506,7 @@
   }
 \cs_new:Npn \@@_map_function_n:Nn #1 #2
   {
-    \__quark_if_recursion_tail_break:nN {#2} \clist_map_break:
+    \quark_if_recursion_tail_break:nN {#2} \clist_map_break:
     \tl_if_empty:nF {#2} { \@@_map_unbrace:Nw #1 #2, }
     \@@_trim_spaces_generic:nw { \@@_map_function_n:Nn #1 }
     \q_mark
diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index e36774f..11071e1 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -245,6 +245,21 @@
 %   ended.
 % \end{function}
 %
+%
+% \begin{function}[added = 2018-04-10]
+%   {
+%     \quark_if_recursion_tail_break:NN,
+%     \quark_if_recursion_tail_break:nN
+%   }
+%   \begin{syntax}
+%     \cs{quark_if_recursion_tail_break:nN} \Arg{token list} \cs[no-index]{\meta{type}_map_break:}
+%   \end{syntax}
+%   Tests if \meta{token list} contains only \cs{q_recursion_tail}, and
+%   if so terminates the recursion using \cs[no-index]{\meta{type}_map_break:}.
+%   The recursion end should be marked by \cs{prg_break_point:Nn}
+%   \cs[no-index]{\meta{type}_map_break:}.
+% \end{function}
+%
 % \section{An example of recursion with quarks}
 % \label{sec:l3quark:quark-example}
 %
@@ -295,23 +310,6 @@
 % mapping function cannot be nested, since the second map would overwrite
 % the definition of |\__my_map_dbl_fn:nn|.
 %
-%
-% \section{Internal quark functions}
-%
-% \begin{function}
-%   {
-%     \__quark_if_recursion_tail_break:NN,
-%     \__quark_if_recursion_tail_break:nN
-%   }
-%   \begin{syntax}
-%     \cs{__quark_if_recursion_tail_break:nN} \Arg{token list} \cs[no-index]{\meta{type}_map_break:}
-%   \end{syntax}
-%   Tests if \meta{token list} contains only \cs{q_recursion_tail}, and
-%   if so terminates the recursion using \cs[no-index]{\meta{type}_map_break:}.
-%   The recursion end should be marked by \cs{prg_break_point:Nn}
-%   \cs[no-index]{\meta{type}_map_break:}.
-% \end{function}
-%
 % \section{Scan marks}
 %
 % Scan marks are control sequences set equal to \cs{scan_stop:},
@@ -467,24 +465,23 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\__quark_if_recursion_tail_break:NN}
-% \begin{macro}{\__quark_if_recursion_tail_break:nN}
-%   Analogs of the \cs[index=quark_if_recursion_tail_stop:n]
+% \begin{macro}{\quark_if_recursion_tail_break:NN}
+% \begin{macro}{\quark_if_recursion_tail_break:nN}
+%   Analogues of the \cs[index=quark_if_recursion_tail_stop:n]
 %   {quark_if_recursion_tail_stop\ldots{}} functions.
 %   Break the mapping using |#2|.
 %    \begin{macrocode}
-\cs_new:Npn \__quark_if_recursion_tail_break:NN #1#2
+\cs_new:Npn \quark_if_recursion_tail_break:NN #1#2
   {
     \if_meaning:w \q_recursion_tail #1
       \exp_after:wN #2
     \fi:
   }
-\cs_new:Npn \__quark_if_recursion_tail_break:nN #1#2
+\cs_new:Npn \quark_if_recursion_tail_break:nN #1#2
   {
-    \tl_if_empty:oTF
+    \tl_if_empty:oT
       { \@@_if_recursion_tail:w {} #1 {} ?! \q_recursion_tail ??! }
       {#2}
-      { }
   }
 %    \end{macrocode}
 % \end{macro}
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 5abf466..261f59c 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1313,7 +1313,7 @@
 \cs_generate_variant:Nn \str_map_inline:Nn { c }
 \cs_new:Npn \@@_map_inline:NN #1#2
   {
-    \__quark_if_recursion_tail_break:NN #2 \str_map_break:
+    \quark_if_recursion_tail_break:NN #2 \str_map_break:
     \exp_args:No #1 { \token_to_str:N #2 }
     \@@_map_inline:NN #1
   }
@@ -1331,7 +1331,7 @@
   { \exp_args:No \str_map_variable:nNn }
 \cs_new_protected:Npn \@@_map_variable:NnN #1#2#3
   {
-    \__quark_if_recursion_tail_break:NN #3 \str_map_break:
+    \quark_if_recursion_tail_break:NN #3 \str_map_break:
     \str_set:Nn #1 {#3}
     \use:n {#2}
     \@@_map_variable:NnN #1 {#2}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index a2d0299..72d4d27 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2207,7 +2207,7 @@
   { \exp_args:No \tl_map_function:nN }
 \cs_new:Npn \@@_map_function:Nn #1#2
   {
-    \__quark_if_recursion_tail_break:nN {#2} \tl_map_break:
+    \quark_if_recursion_tail_break:nN {#2} \tl_map_break:
     #1 {#2} \@@_map_function:Nn #1
   }
 \cs_generate_variant:Nn \tl_map_function:NN { c }
@@ -2258,7 +2258,7 @@
 \cs_new_protected:Npn \@@_map_variable:Nnn #1#2#3
   {
     \tl_set:Nn #1 {#3}
-    \__quark_if_recursion_tail_break:NN #1 \tl_map_break:
+    \quark_if_recursion_tail_break:NN #1 \tl_map_break:
     \use:n {#2}
     \@@_map_variable:Nnn #1 {#2}
   }
@@ -2938,7 +2938,7 @@
   }
 \cs_new:Npn \@@_item:nn #1#2
   {
-    \__quark_if_recursion_tail_break:nN {#2} \prg_break:
+    \quark_if_recursion_tail_break:nN {#2} \prg_break:
     \int_compare:nNnTF {#1} = 1
       { \prg_break:n { \exp_not:n {#2} } }
       { \exp_args:Nf \@@_item:nn { \int_eval:n { #1 - 1 } } }
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 50711b5..7ec8606 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -1889,8 +1889,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index dbcbec4..ecc4cb7 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 69023b4..3c975c1 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 73bdd24..132f503 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 0b69969..f710587 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -1887,8 +1887,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 50711b5..7ec8606 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -1889,8 +1889,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index dbcbec4..ecc4cb7 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 69023b4..3c975c1 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 73bdd24..132f503 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -1570,8 +1570,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 0b69969..f710587 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -1887,8 +1887,8 @@ Defining \quark_if_recursion_tail_stop_do:nn on line ..
 Defining \__quark_if_recursion_tail:w on line ...
 Defining \quark_if_recursion_tail_stop:o on line ...
 Defining \quark_if_recursion_tail_stop_do:on on line ...
-Defining \__quark_if_recursion_tail_break:NN on line ...
-Defining \__quark_if_recursion_tail_break:nN on line ...
+Defining \quark_if_recursion_tail_break:NN on line ...
+Defining \quark_if_recursion_tail_break:nN on line ...
 Defining \quark_if_nil_p:N on line ...
 Defining \quark_if_nil:NT on line ...
 Defining \quark_if_nil:NF on line ...





More information about the latex3-commits mailing list