[latex3-commits] [git/LaTeX3-latex3-latex3] single_token: Move \tl_if_single_token:n(TF) to stable (77d26bd)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Mar 5 13:30:42 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : single_token
Link       : https://github.com/latex3/latex3/commit/77d26bdddbdc54b6ed8073d3b6b155f76de91f56

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

commit 77d26bdddbdc54b6ed8073d3b6b155f76de91f56
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Mar 5 12:30:42 2019 +0000

    Move \tl_if_single_token:n(TF) to stable


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

77d26bdddbdc54b6ed8073d3b6b155f76de91f56
 l3kernel/CHANGELOG.md                   |    4 ++++
 l3kernel/l3candidates.dtx               |   40 -------------------------------
 l3kernel/l3tl.dtx                       |   36 ++++++++++++++++++++++++++++
 l3kernel/testfiles/m3expl001.luatex.tlg |    8 +++----
 l3kernel/testfiles/m3expl001.ptex.tlg   |    8 +++----
 l3kernel/testfiles/m3expl001.tlg        |    8 +++----
 l3kernel/testfiles/m3expl001.uptex.tlg  |    8 +++----
 l3kernel/testfiles/m3expl001.xetex.tlg  |    8 +++----
 l3kernel/testfiles/m3expl003.luatex.tlg |    8 +++----
 l3kernel/testfiles/m3expl003.ptex.tlg   |    8 +++----
 l3kernel/testfiles/m3expl003.tlg        |    8 +++----
 l3kernel/testfiles/m3expl003.uptex.tlg  |    8 +++----
 l3kernel/testfiles/m3expl003.xetex.tlg  |    8 +++----
 13 files changed, 80 insertions(+), 80 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 7df2cdf..84e32aa 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Changed
+
+- Moved `\tl_if_single_token:n(TF)` to stable
+
 ## [2019-03-05]
 
 ### Added
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index dae61ed..fb5a91d 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -965,16 +965,6 @@
 %
 % \section{Additions to \pkg{l3tl}}
 %
-% \begin{function}[EXP,pTF]{\tl_if_single_token:n}
-%   \begin{syntax}
-%   \cs{tl_if_single_token_p:n} \Arg{token list}
-%   \cs{tl_if_single_token:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
-%   \end{syntax}
-%   Tests if the token list consists of exactly one token, \emph{i.e.}~is
-%   either a single space character or a single \enquote{normal} token.
-%   Token groups (|{|\ldots|}|) are not single tokens.
-% \end{function}
-%
 % \begin{function}[EXP, added = 2014-06-30, updated = 2016-01-12]
 %   {
 %     \tl_lower_case:n,  \tl_upper_case:n,  \tl_mixed_case:n,
@@ -2536,36 +2526,6 @@
 %
 % \subsection{Additions to \pkg{l3tl}}
 %
-%    \begin{macrocode}
-%<@@=tl>
-%    \end{macrocode}
-%
-% \begin{macro}[EXP,pTF]{\tl_if_single_token:n}
-%   There are four cases: empty token list, token list starting with a
-%   normal token, with a brace group, or with a space token.  If the
-%   token list starts with a normal token, remove it and check for
-%   emptiness.  For the next case, an empty token list is not a single
-%   token.  Finally, we have a non-empty token list starting with a
-%   space or a brace group.  Applying \texttt{f}-expansion yields an
-%   empty result if and only if the token list is a single space.
-%    \begin{macrocode}
-\prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF }
-  {
-    \tl_if_head_is_N_type:nTF {#1}
-      { \@@_if_empty_if:o { \use_none:n #1 } }
-      {
-        \tl_if_empty:nTF {#1}
-          { \if_false: }
-          { \@@_if_empty_if:o { \exp:w \exp_end_continue_f:w #1 } }
-      }
-      \prg_return_true:
-    \else:
-      \prg_return_false:
-    \fi:
-  }
-%    \end{macrocode}
-% \end{macro}
-%
 % \subsubsection{Unicode case changing}
 %
 % The mechanisms needed for case changing are somewhat involved, particularly
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index ec82eca..01608f5 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -469,6 +469,16 @@
 %   token count $1$ according to \cs{tl_count:n}.
 % \end{function}
 %
+% \begin{function}[EXP,pTF]{\tl_if_single_token:n}
+%   \begin{syntax}
+%   \cs{tl_if_single_token_p:n} \Arg{token list}
+%   \cs{tl_if_single_token:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
+%   \end{syntax}
+%   Tests if the token list consists of exactly one token, \emph{i.e.}~is
+%   either a single space character or a single \enquote{normal} token.
+%   Token groups (|{|\ldots|}|) are not single tokens.
+% \end{function}
+%
 % \begin{function}[added = 2013-07-24, EXP, noTF]{\tl_case:Nn, \tl_case:cn}
 %   \begin{syntax}
 %     \cs{tl_case:NnTF} \meta{test token list variable} \\
@@ -2224,6 +2234,32 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}[EXP,pTF]{\tl_if_single_token:n}
+%   There are four cases: empty token list, token list starting with a
+%   normal token, with a brace group, or with a space token.  If the
+%   token list starts with a normal token, remove it and check for
+%   emptiness.  For the next case, an empty token list is not a single
+%   token.  Finally, we have a non-empty token list starting with a
+%   space or a brace group.  Applying \texttt{f}-expansion yields an
+%   empty result if and only if the token list is a single space.
+%    \begin{macrocode}
+\prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF }
+  {
+    \tl_if_head_is_N_type:nTF {#1}
+      { \@@_if_empty_if:o { \use_none:n #1 } }
+      {
+        \tl_if_empty:nTF {#1}
+          { \if_false: }
+          { \@@_if_empty_if:o { \exp:w \exp_end_continue_f:w #1 } }
+      }
+      \prg_return_true:
+    \else:
+      \prg_return_false:
+    \fi:
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[EXP, noTF]{\tl_case:Nn, \tl_case:cn}
 % \begin{macro}[EXP]{\@@_case:nnTF}
 % \begin{macro}[EXP]{\@@_case:Nw}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index ea5de24..87247ae 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -509,6 +509,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6029,10 +6033,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 7d61902..a0f5740 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6067,10 +6071,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 9d81136..fd7983f 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6067,10 +6071,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 0d0671e..c01f01f 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6064,10 +6068,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 03db412..4908978 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6037,10 +6041,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index ea5de24..87247ae 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -509,6 +509,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6029,10 +6033,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 7d61902..a0f5740 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6067,10 +6071,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 9d81136..fd7983f 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6067,10 +6071,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 0d0671e..c01f01f 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6064,10 +6068,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 03db412..4908978 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -550,6 +550,10 @@ Defining \tl_if_single:nT on line ...
 Defining \tl_if_single:nF on line ...
 Defining \tl_if_single:nTF on line ...
 Defining \__tl_if_single:nnw on line ...
+Defining \tl_if_single_token_p:n on line ...
+Defining \tl_if_single_token:nT on line ...
+Defining \tl_if_single_token:nF on line ...
+Defining \tl_if_single_token:nTF on line ...
 Defining \tl_case:Nn on line ...
 Defining \tl_case:NnT on line ...
 Defining \tl_case:NnF on line ...
@@ -6037,10 +6041,6 @@ Defining \sys_shell_now:n on line ...
 Defining \sys_shell_now:x on line ...
 Defining \sys_shell_shipout:n on line ...
 Defining \sys_shell_shipout:x on line ...
-Defining \tl_if_single_token_p:n on line ...
-Defining \tl_if_single_token:nT on line ...
-Defining \tl_if_single_token:nF on line ...
-Defining \tl_if_single_token:nTF on line ...
 Defining \char_lower_case:N on line ...
 Defining \char_upper_case:N on line ...
 Defining \char_mixed_case:N on line ...





More information about the latex3-commits mailing list