[latex3-commits] [git/LaTeX3-latex3-latex3] master: Deprecation support is now built in to kernel (f7adb67d0)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Sep 23 09:35:12 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/f7adb67d0e03303682967987df6c979e25439c6a
>---------------------------------------------------------------
commit f7adb67d0e03303682967987df6c979e25439c6a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Sep 23 08:35:12 2019 +0100
Deprecation support is now built in to kernel
>---------------------------------------------------------------
f7adb67d0e03303682967987df6c979e25439c6a
l3trial/l3kernel-extras/l3kernel-extras.dtx | 95 ----------------------
.../testfiles/m3kernel-extras007.lvt | 9 --
.../testfiles/m3kernel-extras007.tlg | 15 ----
3 files changed, 119 deletions(-)
diff --git a/l3trial/l3kernel-extras/l3kernel-extras.dtx b/l3trial/l3kernel-extras/l3kernel-extras.dtx
index 6326a6321..5451c4d1a 100644
--- a/l3trial/l3kernel-extras/l3kernel-extras.dtx
+++ b/l3trial/l3kernel-extras/l3kernel-extras.dtx
@@ -85,24 +85,6 @@
% be shorter than a line, otherwise it will be cropped.
% \end{function}
%
-% \subsection{Support for detecting deprecated functions}
-%
-% \begin{function}{\__cs_protected_deprecated:N}
-% \begin{syntax}
-% \cs{__cs_protected_deprecated:N} \meta{control sequence}
-% \end{syntax}
-% Triggers a warning or error with the name of the \meta{control
-% sequence} which is deprecated.
-% \end{function}
-%
-% \begin{function}[EXP]{\__cs_deprecated:N}
-% \begin{syntax}
-% \cs{__cs_deprecated:N} \meta{control sequence}
-% \end{syntax}
-% Triggers an expandable warning or error with the name of the
-% \meta{control sequence} which is deprecated.
-% \end{function}
-%
% \subsection{\pkg{l3basics}}
%
% \begin{function}{\group_insert_after:n, \group_insert_after:x}
@@ -755,83 +737,6 @@
}
% \end{macrocode}
%
-% \subsection{For deprecated commands}
-%
-% \begin{variable}{\l__expl_deprecated_error_bool}
-% Boolean variable which controls if deprecated functions trigger an
-% error or simply a warning. We should add an option to \pkg{expl3}
-% to control that boolean. By default, warnings.
-% \begin{macrocode}
-\bool_new:N \l__expl_deprecated_error_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\__cs_protected_deprecated:N}
-% In format mode, deprecated functions produce a warning. In package
-% mode, it can be a warning or an error.
-% \begin{macrocode}
-\cs_new_protected:Npn \__cs_protected_deprecated:N #1
- {
-%<*package>
- \bool_if:NTF \l__expl_deprecated_error_bool
- \__kernel_msg_error:nnx
-%</package>
- \__kernel_msg_warning:nnx
- { kernel } { deprecated-function } { \token_to_str:N #1 }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\__cs_deprecated:N}
-% The same for expandable functions.
-% \begin{macrocode}
-\cs_new:Npn \__cs_deprecated:N #1
- {
-%<*package>
- \bool_if:NTF \l__expl_deprecated_error_bool
- \__kernel_msg_expandable_error:nnn
-%</package>
- \__kernel_msg_expandable_warning:nnn
- { kernel } { expandable-deprecated-function } {#1}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% Two messages (probably requires improvements).
-% \begin{macrocode}
-\__kernel_msg_new:nnn { kernel } { deprecated-function }
- { The~function~#1~is~deprecated. }
-\__kernel_msg_new:nnn { kernel } { expandable-deprecated-function }
- { #1 deprecated. }
-% \end{macrocode}
-%
-% Redefine a bunch of deprecated commands from \pkg{l3kernel} to make
-% use of \cs{__cs_deprecated:N} and \cs{__cs_protected_deprecated:N}.
-% \begin{macrocode}
-\tl_map_inline:nn
- { \tl_length:n \l_tmpc_int \msg_term:x }
- {
- \cs_new_eq:cN { __cs_deprecated_ \cs_to_str:N #1 } #1
- \bool_lazy_or:nnTF
- { \token_if_protected_macro_p:N #1 }
- { \token_if_protected_long_macro_p:N #1 }
- {
- \cs_gset_protected:Npx #1
- {
- \exp_not:N \__cs_protected_deprecated:N \exp_not:N #1
- \exp_not:c { __cs_deprecated_ \cs_to_str:N #1 }
- }
- }
- {
- \cs_gset:Npx #1
- {
- \exp_not:N \__cs_deprecated:N \exp_not:N #1
- \exp_not:c { __cs_deprecated_ \cs_to_str:N #1 }
- }
- }
- }
-% \end{macrocode}
-%
% \subsection{\pkg{l3basics}}
%
% \begin{macro}{\group_insert_after:n, \group_insert_after:x}
diff --git a/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.lvt b/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.lvt
index e4c9fa64e..e6b9c146a 100644
--- a/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.lvt
+++ b/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.lvt
@@ -29,14 +29,5 @@
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% In l3kernel-extras we use the mechanism for deprecated
-% functions in a couple of examples, which we test here.
-%
-\TEST { deprecated~functions }
- {
- \iow_term:x { \int_use:N \l_tmpc_int , \tl_length:n { abc } }
- }
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\END
diff --git a/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.tlg b/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.tlg
index 5caf116f6..e769658aa 100644
--- a/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.tlg
+++ b/l3trial/l3kernel-extras/testfiles/m3kernel-extras007.tlg
@@ -29,18 +29,3 @@ misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
============================================================
-============================================================
-TEST 2: deprecated functions
-============================================================
-Warning: end of file when \if is incomplete
-l. ...LaTeX3 warning: \l_tmpc_int deprecated.
-l. ... }
-! You can't use `\relax' after \the.
-\l_tmpc_int ...pc_int \__cs_deprecated_l_tmpc_int
-l. ... }
-I'm forgetting what you said and using zero instead.
-Warning: end of file when \if is incomplete
-l. ...LaTeX3 warning: \tl_length:n deprecated.
-l. ... }
-0,\__cs_deprecated_tl_length:n {abc}
-============================================================
More information about the latex3-commits
mailing list