[latex3-commits] [latex3/latex3] gh914-sort-use: Deprecated \tl_sort:nN for \tl_sort_use:nN (b8b0ed1aa)

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/b8b0ed1aae617e26261a82e417e8e46a1d1e20b1

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

commit b8b0ed1aae617e26261a82e417e8e46a1d1e20b1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sat Oct 21 10:04:57 2023 +0100

    Deprecated \tl_sort:nN for \tl_sort_use:nN
    
    See #914


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

b8b0ed1aae617e26261a82e417e8e46a1d1e20b1
 l3kernel/CHANGELOG.md            |  3 +++
 l3kernel/doc/l3obsolete.txt      |  1 +
 l3kernel/l3deprecation.dtx       |  7 +++++++
 l3kernel/l3sort.dtx              | 14 +++++++-------
 l3kernel/l3tl.dtx                |  6 +++---
 l3kernel/testfiles/m3sort002.lvt | 10 +++++-----
 6 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 6fe309d3d..30f36cfde 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_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`
 - Support for user-defined functions in fp expressions:
@@ -21,6 +22,7 @@ this project uses date-based 'snapshot' version identifiers.
 
 ### Deprecated
 - `\text_titlecase:n(n)` as ambiguous: replaced by `\text_titlecase_all:n(n)`
+- `\tl_sort:nN`, replaced by `\tl_sort_use:nN` (issue \#914)
 
 ### Fixed
 - Support arbitrary BCP-47 locales for case-changing overrides (issue \#1239)
@@ -138,6 +140,7 @@ this project uses date-based 'snapshot' version identifiers.
 - `\file_input_raw:n`
 - `\int_if_zero:n(TF)`
 - `\str_mdfive_hash:n`
+
 ### Changed
 - Remove `\noexpand` inside math mode in `\text_expand:n`
 - Re-implement `\dim_to_decimal_in_bp:n` and 
diff --git a/l3kernel/doc/l3obsolete.txt b/l3kernel/doc/l3obsolete.txt
index 7b9c808e5..2027d2b35 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_sort:nN                              2023-05-19
 \tl_upper_case:n                         2020-01-03
 \tl_upper_case:nn                        2020-01-03
 [x-type variants]                        2023-09-27
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index c475058c4..0e7f1f3f7 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -614,6 +614,13 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\tl_sort:nN}
+%    \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2023-10-18 } { \tl_sort_use:nN }
+\cs_gset:Npn \tl_sort:nN { \tl_sort_use:nN }
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Deprecated \pkg{l3token} functions}
 %
 % \begin{macro}[EXP]{\char_to_utfviii_bytes:n}
diff --git a/l3kernel/l3sort.dtx b/l3kernel/l3sort.dtx
index 6837e7fb0..65618c3e7 100644
--- a/l3kernel/l3sort.dtx
+++ b/l3kernel/l3sort.dtx
@@ -689,14 +689,14 @@
 % first item as a pivot (argument |#4| of \cs{@@:nnNnn}).  The
 % arguments of \cs{@@:nnNnn} are 1.~items less than |#4|, 2.~items
 % greater or equal to |#4|, 3.~comparison, 4.~pivot, 5.~next item to
-% test.  If |#5| is the tail of the list, call \cs{tl_sort:nN} on |#1|
+% test.  If |#5| is the tail of the list, call \cs{tl_sort_use:nN} on |#1|
 % and on |#2|, placing |#4| in between; |\use:ff| expands the parts to
-% make \cs{tl_sort:nN} \texttt{f}-expandable.  Otherwise, compare |#4|
+% make \cs{tl_sort_use:nN} \texttt{f}-expandable.  Otherwise, compare |#4|
 % and |#5| using |#3|.  If they are ordered, place |#5| amongst the
 % \enquote{greater} items, otherwise amongst the \enquote{lesser} items,
 % and continue partitioning.
 % \begin{verbatim}
-% \cs_new:Npn \tl_sort:nN #1#2
+% \cs_new:Npn \tl_sort_use:nN #1#2
 %   {
 %     \tl_if_blank:nF {#1}
 %       {
@@ -707,7 +707,7 @@
 % \cs_new:Npn \__sort:nnNnn #1#2#3#4#5
 %   {
 %     \quark_if_recursion_tail_stop_do:nn {#5}
-%       { \use:ff { \tl_sort:nN {#1} #3 {#4} } { \tl_sort:nN {#2} #3 } }
+%       { \use:ff { \tl_sort_use:nN {#1} #3 {#4} } { \tl_sort_use:nN {#2} #3 } }
 %     #3 {#4} {#5}
 %       { \__sort:nnNnn {#1} { #2 {#5} } #3 {#4} }
 %       { \__sort:nnNnn { #1 {#5} } {#2} #3 {#4} }
@@ -790,7 +790,7 @@
 % after code that sorts the smaller items, and after the (braced)
 % \meta{pivot}.
 %
-% The fourth speed up is avoid the recursive call to \cs{tl_sort:nN}
+% The fourth speed up is avoid the recursive call to \cs{tl_sort_use:nN}
 % with an empty first argument.  For this, we introduce functions
 % similar to the \cs{@@_i:nnnnNn} of the last example, but aware of
 % whether the list of \meta{conditional} \Arg{item} read so far that are
@@ -821,7 +821,7 @@
 % sorting lists of more than a few thousand items would exhaust a
 % typical \TeX{}'s memory.
 %
-% \begin{macro}[EXP]{\tl_sort:nN}
+% \begin{macro}[EXP]{\tl_sort_use:nN}
 % \begin{macro}[EXP]
 %   {
 %     \@@_quick_prepare:Nnnn,
@@ -844,7 +844,7 @@
 %   \cs{s_@@_stop} and leaving \cs{exp_stop_f:} to stop
 %   \texttt{f}-expansion.
 %    \begin{macrocode}
-\cs_new:Npn \tl_sort:nN #1#2
+\cs_new:Npn \tl_sort_use:nN #1#2
   {
     \exp_not:f
       {
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index a53691e23..959d9196a 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1065,9 +1065,9 @@
 %   described in Section~\ref{sec:l3sort:mech}.
 % \end{function}
 %
-% \begin{function}[added = 2017-02-06, EXP]{\tl_sort:nN}
+% \begin{function}[added = 2023-10-18, EXP]{\tl_sort_use:nN}
 %   \begin{syntax}
-%     \cs{tl_sort:nN} \Arg{token list} \meta{conditional}
+%     \cs{tl_sort_use:nN} \Arg{token list} \meta{conditional}
 %   \end{syntax}
 %   Sorts the items in the \meta{token list}, using the
 %   \meta{conditional} to compare items, and leaves the result in the
@@ -2950,7 +2950,7 @@
 % \end{macro}
 %
 % \begin{macro}
-%   {\tl_sort:Nn, \tl_sort:cn, \tl_gsort:Nn, \tl_gsort:cn, \tl_sort:nN}
+%   {\tl_sort:Nn, \tl_sort:cn, \tl_gsort:Nn, \tl_gsort:cn, \tl_sort_use:nN}
 %   Implemented in \pkg{l3sort}.
 % \end{macro}
 %
diff --git a/l3kernel/testfiles/m3sort002.lvt b/l3kernel/testfiles/m3sort002.lvt
index 7548774ff..e4cbc1b18 100644
--- a/l3kernel/testfiles/m3sort002.lvt
+++ b/l3kernel/testfiles/m3sort002.lvt
@@ -24,13 +24,13 @@
 
 \TESTEXP { Sort~expandably }
   {
-    | \tl_sort:nN { } \ERROR |
+    | \tl_sort_use:nN { } \ERROR |
     \NEWLINE
-    \tl_sort:nN { {a\par b} } \ERROR
+    \tl_sort_use:nN { {a\par b} } \ERROR
     \NEWLINE
-    \tl_sort:nN { 8{+2}3461{-0}2{00}3748 } \test_compare:nnTF
+    \tl_sort_use:nN { 8{+2}3461{-0}2{00}3748 } \test_compare:nnTF
     \NEWLINE
-    \exp_args:Nf \tl_sort:nN
+    \exp_args:Nf \tl_sort_use:nN
       { \prg_replicate:nn { 10 } { 8{+2}3461{-0}2{00}3748 } }
       \test_compare:nnTF
   }
@@ -49,7 +49,7 @@
 \TIMO
 
 \TESTEXP { More~expandable~sorting }
-  { \exp_args:No \tl_sort:nN \l_tmpa_tl \test_compare:nnTF }
+  { \exp_args:No \tl_sort_use:nN \l_tmpa_tl \test_compare:nnTF }
 
 
 \END





More information about the latex3-commits mailing list.