[latex3-commits] [latex3/latex3] gh914-sort-use: Deprecate \tl_reverse:n for \tl_reverse_use:n (5b569c3cf)

github at latex-project.org github at latex-project.org
Sat Oct 21 11:05:13 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : gh914-sort-use
Link       : https://github.com/latex3/latex3/commit/5b569c3cfe8c79559cae9a038ea3e299bb3db393

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

commit 5b569c3cfe8c79559cae9a038ea3e299bb3db393
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 18 08:48:31 2023 +0100

    Deprecate \tl_reverse:n for \tl_reverse_use:n


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

5b569c3cfe8c79559cae9a038ea3e299bb3db393
 l3kernel/CHANGELOG.md                |  2 ++
 l3kernel/doc/l3obsolete.txt          |  1 +
 l3kernel/doc/l3syntax-changes.tex    |  2 +-
 l3kernel/l3deprecation.dtx           |  7 +++++++
 l3kernel/l3tl.dtx                    | 22 ++++++++++++----------
 l3kernel/testfiles/m3tl-build001.lvt |  2 +-
 l3kernel/testfiles/m3tl007.lvt       | 14 +++++++-------
 l3kernel/testfiles/m3tl007.tlg       |  2 +-
 l3kernel/testfiles/m3tl009.lvt       |  2 +-
 l3kernel/testfiles/m3tlist002.lvt    |  4 ++--
 10 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 30f36cfde..05c4182d6 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -10,6 +10,7 @@ this project uses date-based 'snapshot' version identifiers.
 ### Added
 - `\text_titlecase_all:n(n)`
 - `\token_to_catcode:N`
+- `\tl_reverse_use:n` (was `\tl_reverse:n`)
 - `\tl_sort_use:nN` (was `\tl_sort:nN`)
 - Support for symbolic variables in fp input:
   `\fp_new_variable:n`, `\fp_set_variable:nn` and `\fp_clear_variable:n`
@@ -22,6 +23,7 @@ this project uses date-based 'snapshot' version identifiers.
 
 ### Deprecated
 - `\text_titlecase:n(n)` as ambiguous: replaced by `\text_titlecase_all:n(n)`
+- `\tl_reverse:n`, replaced by `\tl_reverse_use:n`
 - `\tl_sort:nN`, replaced by `\tl_sort_use:nN` (issue \#914)
 
 ### Fixed
diff --git a/l3kernel/doc/l3obsolete.txt b/l3kernel/doc/l3obsolete.txt
index 2027d2b35..abdde05f1 100644
--- a/l3kernel/doc/l3obsolete.txt
+++ b/l3kernel/doc/l3obsolete.txt
@@ -70,6 +70,7 @@ Function                            Date deprecated
 \tl_lower_case:nn                        2020-01-03
 \tl_mixed_case:n                         2020-01-03
 \tl_mixed_case:nn                        2020-01-03
+\tl_reverse:n                            2023-05-22
 \tl_sort:nN                              2023-05-19
 \tl_upper_case:n                         2020-01-03
 \tl_upper_case:nn                        2020-01-03
diff --git a/l3kernel/doc/l3syntax-changes.tex b/l3kernel/doc/l3syntax-changes.tex
index dbb6d858b..9e8983182 100644
--- a/l3kernel/doc/l3syntax-changes.tex
+++ b/l3kernel/doc/l3syntax-changes.tex
@@ -59,7 +59,7 @@ changes after August 2011 are listed, with an approximate date.
       \meta{normal token or brace group}
       \meta{optional spaces}.
     \]
-  \item \cs{tl_reverse:n} stripped outer braces and lost unprotected spaces.
+  \item \cs{tl_reverse_use:n} stripped outer braces and lost unprotected spaces.
     Now it keeps spaces, leaves unbraced single tokens unbraced, and
     braced groups braced.
   \item \cs{tl_trim_spaces:n} only removed one leading and trailing space.
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 0e7f1f3f7..e9bba191e 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -621,6 +621,13 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\tl_reverse:n}
+%    \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2023-10-18 } { \tl_reverse_use:n }
+\cs_gset:Npn \tl_reverse:n { \tl_reverse_use:n }
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Deprecated \pkg{l3token} functions}
 %
 % \begin{macro}[EXP]{\char_to_utfviii_bytes:n}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 959d9196a..5342c6e42 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -550,10 +550,13 @@
 %   |a~{bc}| is $6$.
 % \end{function}
 %
-% \begin{function}[updated = 2012-01-08, EXP]
-%   {\tl_reverse:n, \tl_reverse:V, \tl_reverse:o, \tl_reverse:f, \tl_reverse:e}
+% \begin{function}[added = 2023-10-18, EXP]
+%   {
+%     \tl_reverse_use:n, \tl_reverse_use:V, \tl_reverse_use:e,
+%     \tl_reverse_use:f, \tl_reverse_use:o
+%   }
 %   \begin{syntax}
-%     \cs{tl_reverse:n} \Arg{token list}
+%     \cs{tl_reverse_use:n} \Arg{token list}
 %   \end{syntax}
 %   Reverses the order of the \meta{items} in the \meta{token list},
 %   so that \meta{item_1}\meta{item_2}\meta{item_3} \ldots \meta{item_n}
@@ -600,7 +603,7 @@
 %   reversing the order of tokens, and keep the outer set of braces.
 %   Items which are initially not braced are copied with braces in
 %   the result. In cases where preserving spaces is important,
-%   consider the slower function \cs{tl_reverse:n}.
+%   consider the slower function \cs{tl_reverse_use:n}.
 %   \begin{texnote}
 %     The result is returned within \tn{unexpanded}, which means that the token
 %     list does not expand further when appearing in an \texttt{x}-type
@@ -3397,8 +3400,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[EXP]
-%   {\tl_reverse:n, \tl_reverse:o, \tl_reverse:V, \tl_reverse:f, \tl_reverse:e}
+% \begin{macro}[EXP]{\tl_reverse_use:n, \tl_reverse_use:V, \tl_reverse_use:e, \tl_reverse_use:f, \tl_reverse_use:o}
 % \begin{macro}[EXP]{\@@_reverse_normal:nN}
 % \begin{macro}[EXP]{\@@_reverse_group_preserve:nn}
 % \begin{macro}[EXP]{\@@_reverse_space:n}
@@ -3408,7 +3410,7 @@
 %   output. Grouped tokens are output to the left but without any reversal
 %   within the group.
 %    \begin{macrocode}
-\cs_new:Npn \tl_reverse:n #1
+\cs_new:Npn \tl_reverse_use:n #1
   {
     \__kernel_exp_not:w \exp_after:wN
       {
@@ -3420,7 +3422,7 @@
           {#1}
       }
   }
-\cs_generate_variant:Nn \tl_reverse:n { o , V , f , e }
+\cs_generate_variant:Nn \tl_reverse_use:n { o , V , f , e }
 \cs_new:Npn \@@_reverse_normal:N
   { \@@_act_reverse_output:n }
 \cs_new:Npn \@@_reverse_group_preserve:n #1
@@ -3438,9 +3440,9 @@
 %   which stops the \texttt{f}-expansion.
 %    \begin{macrocode}
 \cs_new_protected:Npn \tl_reverse:N #1
-  { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+  { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_reverse_use:n { #1 } } }
 \cs_new_protected:Npn \tl_greverse:N #1
-  { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+  { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_reverse_use:n { #1 } } }
 \cs_generate_variant:Nn \tl_reverse:N  { c }
 \cs_generate_variant:Nn \tl_greverse:N { c }
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3tl-build001.lvt b/l3kernel/testfiles/m3tl-build001.lvt
index 0e4e36dde..11b214947 100644
--- a/l3kernel/testfiles/m3tl-build001.lvt
+++ b/l3kernel/testfiles/m3tl-build001.lvt
@@ -33,7 +33,7 @@
         {
           \tl_build_gput_right:Nn \g_tmpb_tl { #1 : }
           \tl_build_gput_left:Nn \g_tmpb_tl { #1 ~ }
-          \tl_build_gput_right:Ne \g_tmpb_tl { \tl_reverse:n {#1} ~ }
+          \tl_build_gput_right:Ne \g_tmpb_tl { \tl_reverse_use:n {#1} ~ }
         }
       \tl_build_gend:N \g_tmpb_tl
     \group_end:
diff --git a/l3kernel/testfiles/m3tl007.lvt b/l3kernel/testfiles/m3tl007.lvt
index 353b3fe21..ca0b73915 100644
--- a/l3kernel/testfiles/m3tl007.lvt
+++ b/l3kernel/testfiles/m3tl007.lvt
@@ -22,20 +22,20 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\TEST{tl_reverse}{
-  \test:n { \tl_reverse:n { } }
-  \test:n { \tl_reverse:n {a\bc} }
-  \test:n { \tl_reverse:n {a~\bc} }
+\TEST{tl_reverse_use}{
+  \test:n { \tl_reverse_use:n { } }
+  \test:n { \tl_reverse_use:n {a\bc} }
+  \test:n { \tl_reverse_use:n {a~\bc} }
   \use:e
     {
       \test:n
         {
-          \exp_not:N \tl_reverse:n
+          \exp_not:N \tl_reverse_use:n
             { a ~ \use:n {~} \exp_not:N \b \c_space_tl }
         }
     }
-  \test:n { \tl_reverse:n { { } } }
-  \test:n { \tl_reverse:n { a ~ { \b { { } c } D # & \if_false: } } }
+  \test:n { \tl_reverse_use:n { { } } }
+  \test:n { \tl_reverse_use:n { a ~ { \b { { } c } D # & \if_false: } } }
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/l3kernel/testfiles/m3tl007.tlg b/l3kernel/testfiles/m3tl007.tlg
index 9f1fcd5e3..a92abc915 100644
--- a/l3kernel/testfiles/m3tl007.tlg
+++ b/l3kernel/testfiles/m3tl007.tlg
@@ -2,7 +2,7 @@ This is a generated file for the LaTeX (2e + expl3) validation system.
 Don't change this file in any respect.
 Author: Bruno Le Floch
 ============================================================
-TEST 1: tl_reverse
+TEST 1: tl_reverse_use
 ============================================================
 ||
 |\bc a|
diff --git a/l3kernel/testfiles/m3tl009.lvt b/l3kernel/testfiles/m3tl009.lvt
index 236b6a48b..6a3bfdcee 100644
--- a/l3kernel/testfiles/m3tl009.lvt
+++ b/l3kernel/testfiles/m3tl009.lvt
@@ -182,7 +182,7 @@
         \tl_log:N \l_A_tl
         \tl_log:n { & \tex_cr:D }
         \tex_cr:D
-        \TYPE{1} \tl_reverse:n { \tex_cr:D & }
+        \TYPE{1} \tl_reverse_use:n { \tex_cr:D & }
       }
     }
 }
diff --git a/l3kernel/testfiles/m3tlist002.lvt b/l3kernel/testfiles/m3tlist002.lvt
index 6177dd9d9..0a13fbc19 100644
--- a/l3kernel/testfiles/m3tlist002.lvt
+++ b/l3kernel/testfiles/m3tlist002.lvt
@@ -126,8 +126,8 @@
 
 \tl_set:Nn \l_tmpa_tl { abc~{abc}~abc }
 \TESTEXP{Reversing~(TLIST)}{
-  \tl_reverse:n { abc~{abc}~abc } \NEWLINE
-  \tl_reverse:o { \l_tmpa_tl }
+  \tl_reverse_use:n { abc~{abc}~abc } \NEWLINE
+  \tl_reverse_use:o { \l_tmpa_tl }
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





More information about the latex3-commits mailing list.