[latex3-commits] [latex3/latex3] e-type: Define x-type variants using \cs_generate_variant:Nn (d0fdcab93)
github at latex-project.org
github at latex-project.org
Wed Sep 27 22:38:51 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : e-type
Link : https://github.com/latex3/latex3/commit/d0fdcab93df9d5b60bd0117f2b5ad24a80df19db
>---------------------------------------------------------------
commit d0fdcab93df9d5b60bd0117f2b5ad24a80df19db
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Sep 27 21:29:20 2023 +0100
Define x-type variants using \cs_generate_variant:Nn
Only \use:x is excluded.
This will allow trapping all x-type variants from
\exp_args:N...x, so deprecation warnings can be
added en masse easily.
>---------------------------------------------------------------
d0fdcab93df9d5b60bd0117f2b5ad24a80df19db
l3kernel/l3debug.dtx | 6 ------
l3kernel/l3file.dtx | 4 ++--
l3kernel/l3tl.dtx | 31 +++++++------------------------
3 files changed, 9 insertions(+), 32 deletions(-)
diff --git a/l3kernel/l3debug.dtx b/l3kernel/l3debug.dtx
index 303bfb952..bb2f261bf 100644
--- a/l3kernel/l3debug.dtx
+++ b/l3kernel/l3debug.dtx
@@ -846,13 +846,11 @@
\tl_put_left:Nv
\tl_put_left:Ne
\tl_put_left:No
- \tl_put_left:Nx
\tl_put_right:Nn
\tl_put_right:NV
\tl_put_right:Nv
\tl_put_right:Ne
\tl_put_right:No
- \tl_put_right:Nx
\tl_build_begin:N
\tl_build_put_right:Nn
\tl_build_put_left:Nn
@@ -913,16 +911,13 @@
\tl_gput_left:Nv
\tl_gput_left:Ne
\tl_gput_left:No
- \tl_gput_left:Nx
\tl_gput_right:Nn
\tl_gput_right:NV
\tl_gput_right:Nv
\tl_gput_right:Ne
\tl_gput_right:No
- \tl_gput_right:Nx
\tl_build_gbegin:N
\tl_build_gput_right:Nn
- \tl_build_gput_right:Nx
\tl_build_gput_left:Nn
\vbox_gset:Nn
\vbox_gset_top:Nn
@@ -947,7 +942,6 @@
\muskip_const:Nn
\skip_const:Nn
\tl_const:Nn
- \tl_const:Nx
}
% \end{macrocode}
%
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 8de5005df..1ddd6b166 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1879,10 +1879,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_log:n { \iow_now:Nn \c_log_iow }
\cs_set_protected:Npn \iow_log:e { \iow_now:Ne \c_log_iow }
-\cs_new_protected:Npn \iow_log:x { \iow_now:Nx \c_log_iow }
+\cs_generate_variant:Nn \iow_log:n { x }
\cs_new_protected:Npn \iow_term:n { \iow_now:Nn \c_term_iow }
\cs_set_protected:Npn \iow_term:e { \iow_now:Ne \c_term_iow }
-\cs_new_protected:Npn \iow_term:x { \iow_now:Nx \c_term_iow }
+\cs_generate_variant:Nn \iow_term:n { x }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index cf7364baa..3695855d1 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1360,13 +1360,8 @@
\__kernel_chk_if_free_cs:N #1
\cs_gset_nopar:Npe #1 { \__kernel_exp_not:w {#2} }
}
-\cs_new_protected:Npn \tl_const:Nx #1#2
- {
- \__kernel_chk_if_free_cs:N #1
- \cs_gset_nopar:Npe #1 {#2}
- }
\cs_generate_variant:Nn \tl_const:Nn { Ne , c , ce }
-\cs_generate_variant:Nn \tl_const:Nx { c }
+\cs_generate_variant:Nn \tl_const:Nn { Nx , cx }
% \end{macrocode}
% \end{macro}
%
@@ -1502,22 +1497,18 @@
{ \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_set:No #1#2
{ \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
-\cs_new_protected:Npn \tl_set:Nx #1#2
- { \__kernel_tl_set:Ne #1 {#2} }
\cs_new_protected:Npn \tl_gset:Nn #1#2
{ \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_gset:No #1#2
{ \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
-\cs_new_protected:Npn \tl_gset:Nx #1#2
- { \__kernel_tl_gset:Ne #1 {#2} }
\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Ne , Nf }
\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , ce , cf }
-\cs_generate_variant:Nn \tl_set:Nx { c }
\cs_generate_variant:Nn \tl_set:No { c }
+\cs_generate_variant:Nn \tl_set:Nn { Nx , cx }
\cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Ne , Nf }
\cs_generate_variant:Nn \tl_gset:Nn { c, cV , cv , ce , cf }
-\cs_generate_variant:Nn \tl_gset:Nx { c }
\cs_generate_variant:Nn \tl_gset:No { c }
+\cs_generate_variant:Nn \tl_gset:Nn { Nx , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1569,8 +1560,6 @@
\__kernel_exp_not:w \exp_after:wN {#1}
}
}
-\cs_new_protected:Npn \tl_put_left:Nx #1#2
- { \__kernel_tl_set:Ne #1 { #2 \__kernel_exp_not:w \exp_after:wN {#1} } }
\cs_new_protected:Npn \tl_gput_left:Nn #1#2
{
\__kernel_tl_gset:Ne #1
@@ -1602,20 +1591,18 @@
\__kernel_exp_not:w \exp_after:wN {#1}
}
}
-\cs_new_protected:Npn \tl_gput_left:Nx #1#2
- { \__kernel_tl_gset:Ne #1 { #2 \__kernel_exp_not:w \exp_after:wN {#1} } }
\cs_generate_variant:Nn \tl_put_left:Nn { c }
\cs_generate_variant:Nn \tl_put_left:NV { c }
\cs_generate_variant:Nn \tl_put_left:Nv { c }
\cs_generate_variant:Nn \tl_put_left:Ne { c }
\cs_generate_variant:Nn \tl_put_left:No { c }
-\cs_generate_variant:Nn \tl_put_left:Nx { c }
+\cs_generate_variant:Nn \tl_put_left:Nn { Nx, cx }
\cs_generate_variant:Nn \tl_gput_left:Nn { c }
\cs_generate_variant:Nn \tl_gput_left:NV { c }
\cs_generate_variant:Nn \tl_gput_left:Nv { c }
\cs_generate_variant:Nn \tl_gput_left:Ne { c }
\cs_generate_variant:Nn \tl_gput_left:No { c }
-\cs_generate_variant:Nn \tl_gput_left:Nx { c }
+\cs_generate_variant:Nn \tl_gput_left:Nn { Nx , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1664,8 +1651,6 @@
\__kernel_exp_not:w \exp_after:wN {#2}
}
}
-\cs_new_protected:Npn \tl_put_right:Nx #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#1} #2 } }
\cs_new_protected:Npn \tl_gput_right:Nn #1#2
{ \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_gput_right:NV #1#2
@@ -1694,20 +1679,18 @@
\__kernel_exp_not:w \exp_after:wN {#2}
}
}
-\cs_new_protected:Npn \tl_gput_right:Nx #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#1} #2 } }
\cs_generate_variant:Nn \tl_put_right:Nn { c }
\cs_generate_variant:Nn \tl_put_right:NV { c }
\cs_generate_variant:Nn \tl_put_right:Nv { c }
\cs_generate_variant:Nn \tl_put_right:Ne { c }
\cs_generate_variant:Nn \tl_put_right:No { c }
-\cs_generate_variant:Nn \tl_put_right:Nx { c }
+\cs_generate_variant:Nn \tl_put_right:Nn { Nx , cx }
\cs_generate_variant:Nn \tl_gput_right:Nn { c }
\cs_generate_variant:Nn \tl_gput_right:NV { c }
\cs_generate_variant:Nn \tl_gput_right:Nv { c }
\cs_generate_variant:Nn \tl_gput_right:Ne { c }
\cs_generate_variant:Nn \tl_gput_right:No { c }
-\cs_generate_variant:Nn \tl_gput_right:Nx { c }
+\cs_generate_variant:Nn \tl_gput_right:Nn { Nx, cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
More information about the latex3-commits
mailing list.