[latex3-commits] [l3svn] r7380 - Rename \deprecation_error: to \debug_deprecation_on:, change implementation
noreply at latex-project.org
noreply at latex-project.org
Sun Jul 16 23:05:05 CEST 2017
Author: bruno
Date: 2017-07-16 23:05:04 +0200 (Sun, 16 Jul 2017)
New Revision: 7380
Modified:
trunk/l3kernel/l3basics.dtx
trunk/l3kernel/l3box.dtx
trunk/l3kernel/l3candidates.dtx
trunk/l3kernel/l3coffins.dtx
trunk/l3kernel/l3deprecation.dtx
trunk/l3kernel/l3file.dtx
trunk/l3kernel/l3fp-round.dtx
trunk/l3kernel/l3int.dtx
trunk/l3kernel/l3sort.dtx
trunk/l3kernel/l3tl.dtx
trunk/l3kernel/testfiles/m3deprecation001.luatex.tlg
trunk/l3kernel/testfiles/m3deprecation001.lvt
trunk/l3kernel/testfiles/m3deprecation001.tlg
trunk/l3kernel/testfiles/m3expl001.luatex.tlg
trunk/l3kernel/testfiles/m3expl001.ptex.tlg
trunk/l3kernel/testfiles/m3expl001.tlg
trunk/l3kernel/testfiles/m3expl001.uptex.tlg
trunk/l3kernel/testfiles/m3expl001.xetex.tlg
trunk/l3kernel/testfiles/m3expl003.luatex.tlg
trunk/l3kernel/testfiles/m3expl003.ptex.tlg
trunk/l3kernel/testfiles/m3expl003.tlg
trunk/l3kernel/testfiles/m3expl003.uptex.tlg
trunk/l3kernel/testfiles/m3expl003.xetex.tlg
Log:
Rename \deprecation_error: to \debug_deprecation_on:, change implementation
Now the information (date, replacement) for each
deprecated-but-not-removed command is only in the corresponding file
and the date in l3obsolete. Also provide \debug_deprecation_off:.
Modified: trunk/l3kernel/l3basics.dtx
===================================================================
--- trunk/l3kernel/l3basics.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3basics.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -1688,6 +1688,328 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Debugging and patching later definitions}
+%
+% \begin{macro}[int]{\__debug:TF}
+% A more meaningful test of whether debugging is enabled than messing
+% up with guards. We can also more easily change the logic in one
+% place then. At present, debugging is disabled in the format and in
+% generic mode, while in \LaTeXe{} mode it is enabled if one of the
+% options \texttt{enable-debug}, \texttt{log-functions} or
+% \texttt{check-declarations} was given.
+% \begin{macrocode}
+\cs_set_protected:Npn \__debug:TF #1#2 {#2}
+%<*package>
+\tex_ifodd:D \l at expl@enable at debug@bool
+ \cs_set_protected:Npn \__debug:TF #1#2 {#1}
+\fi:
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\debug_check_declarations_on:, \debug_check_declarations_off:}
+% \begin{macro}[int]{\__chk_if_exist_var:N}
+% When debugging is not active these two user functions produce an
+% error. Otherwise they set up \cs{__chk_if_exist_var:N}, a function
+% which when \texttt{check-declarations} is active tests that a given
+% variable is defined.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \debug_check_declarations_on:
+ {
+ \cs_set_protected:Npn \__chk_if_exist_var:N ##1
+ {
+ \cs_if_exist:NF ##1
+ {
+ \__msg_kernel_error:nnx { check } { non-declared-variable }
+ { \token_to_str:N ##1 }
+ }
+ }
+ }
+ \cs_set_protected:Npn \debug_check_declarations_off:
+ { \cs_set_protected:Npn \__chk_if_exist_var:N ##1 { } }
+ \tex_ifodd:D \l at expl@check at declarations@bool
+ \debug_check_declarations_on:
+ \else:
+ \debug_check_declarations_off:
+ \fi:
+ }
+ {
+ \cs_set_protected:Npn \debug_check_declarations_on:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_check_declarations_on: }
+ }
+ \cs_set_protected:Npn \debug_check_declarations_off:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_check_declarations_off: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\debug_log_functions_on:, \debug_log_functions_off:}
+% \begin{macro}[int]{\__debug_log:x, \__debug_suspend_log:, \__debug_resume_log:}
+% The \cs{debug_log_functions_on:} and \texttt{off} functions
+% (corresponding to the \pkg{expl3} option \texttt{log-functions})
+% control whether \cs{__debug_log:x} writes to the log file or not.
+% Since \cs{iow_log:x} does not yet have its final definition we do
+% not use \cs{cs_set_eq:NN} (not defined yet anyway). The
+% \cs{__debug_suspend_log:} function disables \cs{__debug_log:x} until
+% the matching \cs{__debug_resume_log:}. These two commands are used
+% to improve the logging for datatypes with multiple parts, currently
+% only coffins. They should come in pairs, which can be nested (this
+% complicates the code here and is currently unused). The function
+% \cs{exp_not:o} is defined in \pkg{l3expan} later on but
+% \cs{__debug_suspend_log:} and \cs{__debug_resume_log:} are not used
+% before that point. Once everything is defined, turn logging on or
+% off depending on what option was given.
+% When debugging is not enabled, simply produce an error.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \debug_log_functions_on:
+ {
+ \cs_set_protected:Npn \__debug_log:x { \iow_log:x }
+ \cs_set_protected:Npn \__debug_suspend_log:
+ {
+ \cs_set_protected:Npx \__debug_resume_log:
+ {
+ \cs_set_protected:Npn \__debug_resume_log:
+ { \exp_not:o { \__debug_resume_log: } }
+ \cs_set_protected:Npn \__debug_log:x
+ { \exp_not:o { \__debug_log:x } }
+ }
+ \cs_set_protected:Npn \__debug_log:x { \use_none:n }
+ }
+ \cs_set_protected:Npn \__debug_resume_log: { }
+ }
+ \cs_set_protected:Npn \debug_log_functions_off:
+ {
+ \cs_set_protected:Npn \__debug_log:x { \use_none:n }
+ \cs_set_protected:Npn \__debug_suspend_log: { }
+ \cs_set_protected:Npn \__debug_resume_log: { }
+ }
+ \tex_ifodd:D \l at expl@log at functions@bool
+ \debug_log_functions_on:
+ \else:
+ \debug_log_functions_off:
+ \fi:
+ }
+ {
+ \cs_set_protected:Npn \debug_log_functions_on:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_log_functions_on: }
+ }
+ \cs_set_protected:Npn \debug_log_functions_off:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_log_functions_off: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\debug_deprecation_on:, \debug_deprecation_off:}
+% \begin{variable}{\g__debug_deprecation_on_tl, \g__debug_deprecation_off_tl}
+% Some commands were more recently deprecated and not yet removed;
+% only make these into errors if the user requests it. This relies on
+% two token lists, filled up by calls to
+% \cs{__debug_deprecation:nnNNpn} in each module.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \debug_deprecation_on:
+ { \g__debug_deprecation_on_tl }
+ \cs_set_protected:Npn \debug_deprecation_off:
+ { \g__debug_deprecation_off_tl }
+ \cs_set_nopar:Npn \g__debug_deprecation_on_tl { }
+ \cs_set_nopar:Npn \g__debug_deprecation_off_tl { }
+ }
+ {
+ \cs_set_protected:Npn \debug_deprecation_on:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_deprecation_on: }
+ }
+ \cs_set_protected:Npn \debug_deprecation_off:
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \token_to_str:N \debug_deprecation_off: }
+ }
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+%
+% \begin{macro}[int]{\__debug_deprecation:nnNNpn}
+% \begin{macro}[aux]{\__debug_deprecation_aux:nnNnn}
+% Grab a definition (at present, must be \cs{cs_new_protected:Npn}).
+% Add to \cs{g__debug_deprecation_on_tl} some code that makes the
+% defined macro |#3| outer (and defines it as an error). Add to
+% \cs{g__debug_deprecation_off_tl} the definition itself. In both
+% cases we undefine the token with \cs{tex_let:D} to avoid taking a
+% potentially outer macro as the argument of some \pkg{expl3}
+% function. Finally define the macro itself to produce a warning then
+% redefine and call itself. The macro initially takes no parameters:
+% together with the \texttt{x}-expanding assignment and \cs{exp_not:n}
+% this gives a convenient way of storing the macro's definition in
+% itself in order to only produce the warning once for each macro.
+% If debugging is disabled, \cs{__debug_deprecation:nnNNpn} lets the
+% definition happen.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_deprecation:nnNNpn #1#2#3#4#5#
+ {
+ \if_meaning:w \cs_new_protected:Npn #3
+ \else:
+ \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
+ { \token_to_str:N #3 ~(for~deprecation) }
+ \fi:
+ \__debug_deprecation_aux:nnNnn {#1} {#2} #4 {#5}
+ }
+ \cs_set_protected:Npn \__debug_deprecation_aux:nnNnn #1#2#3#4#5
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ {
+ \tex_let:D #3 \scan_stop:
+ \__deprecation_error:Nnn #3 {#2} {#1}
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ {
+ \tex_let:D #3 \scan_stop:
+ \cs_set_protected:Npn #3 #4 {#5}
+ }
+ \cs_new_protected:Npx #3
+ {
+ \exp_not:N \__msg_kernel_warning:nnxxx
+ { kernel } { deprecated-command }
+ {#1} { \token_to_str:N #3 } { \tl_to_str:n {#2} }
+ \exp_not:n { \cs_gset_protected:Npn #3 #4 {#5} }
+ \exp_not:N #3
+ }
+ }
+ }
+ { \cs_set_protected:Npn \__debug_deprecation:nnNNpn #1#2 { } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[int]{\__debug_patch:nnNw}
+% \begin{macro}[aux,EXP]{\__debug_patch_case:N}
+% \begin{macro}[aux]
+% {
+% \__debug_patch_param:NNnnNnp,
+% \__debug_patch_cs:nnNNnn,
+% \__debug_patch_conditional:nnNNnnn
+% }
+% When debugging is not enabled, \cs{__debug_patch:nnNw} throws the
+% patch away. Otherwise it can be followed by \cs{cs_new:Npn} or
+% \cs{prg_new_conditional:Npnn} or their protected counterparts. In
+% each case, grab the name of the function to be defined and its
+% parameters using \cs{__debug_patch_param:w} then insert tokens
+% before and after the definition. Of course for a conditional one
+% should likely not insert anything after the code.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_patch:nnNw #1#2#3
+ {
+ \tex_ifcase:D \__debug_patch_case:N #3
+ \or:
+ \exp_after:wN \__debug_patch_param:NNnnNnp
+ \exp_after:wN \__debug_patch_cs:nnNNnn
+ \else:
+ \exp_after:wN \__debug_patch_param:NNnnNnp
+ \exp_after:wN \__debug_patch_conditional:nnNNnnn
+ \fi:
+ \use_none:nn {#1} {#2} #3
+ }
+ \cs_set:Npn \__debug_patch_case:N #1
+ {
+ \if_meaning:w #1 \cs_new_protected:Npn 1~ \fi:
+ \if_meaning:w #1 \cs_new:Npn 1~ \fi:
+ \if_meaning:w #1 \cs_set_protected:Npn 1~ \fi:
+ \if_meaning:w #1 \cs_set:Npn 1~ \fi:
+ \if_meaning:w #1 \cs_gset_protected:Npn 1~ \fi:
+ \if_meaning:w #1 \cs_gset:Npn 1~ \fi:
+ \if_meaning:w #1 \prg_new_protected_conditional:Npnn 2~ \fi:
+ \if_meaning:w #1 \prg_new_conditional:Npnn 2~ \fi:
+ 0~ %
+ \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
+ { \token_to_str:N #1 }
+ }
+ \cs_set_protected:Npn \__debug_patch_param:NNnnNnp #1#2#3#4#5#6#7#
+ { #1 {#3} {#4} #5 #6 {#7} }
+ \cs_set_protected:Npn \__debug_patch_cs:nnNNnn #1#2#3#4#5#6
+ { #3 #4 #5 { #1 #6 #2 } }
+ \cs_set_protected:Npn \__debug_patch_conditional:nnNNnnn
+ #1#2#3#4#5#6#7
+ { #3 #4 #5 {#6} { #1 #7 #2 } }
+ }
+ { \cs_set_protected:Npn \__debug_patch:nnNw #1#2 { } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[int]{\__debug_patch_args:nNw}
+% \begin{macro}[aux]
+% {
+% \__debug_tmp:w,
+% \__debug_patch_args_param:NNnNnp,
+% \__debug_patch_args_cs:nNNnn,
+% \__debug_patch_args_conditional:nNNnnn
+% }
+% See \cs{__debug_patch:nnNw}. The first argument is something like
+% |{#1}{(#2)}|. Define a temporary macro using the \meta{parameters}
+% and \meta{code} of the definition that follows, then expand that
+% temporary macro in front of the first argument to obtain new
+% \meta{code}. Then perform the definition as if that new \meta{code}
+% was directly typed in the file. To make it easy to expand in the
+% definition, treat it as a \enquote{pre}-code to an empty definition.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_patch_args:nNw #1#2
+ {
+ \tex_ifcase:D \__debug_patch_case:N #2
+ \or:
+ \exp_after:wN \__debug_patch_args_param:NNnNnp
+ \exp_after:wN \__debug_patch_args_cs:nNNnn
+ \else:
+ \exp_after:wN \__debug_patch_args_param:NNnNnp
+ \exp_after:wN \__debug_patch_args_conditional:nNNnnn
+ \fi:
+ \use_none:n {#1} #2
+ }
+ \cs_set_protected:Npn \__debug_patch_args_param:NNnNnp #1#2#3#4#5#6#
+ { #1 {#3} #4 #5 {#6} }
+ \cs_set_protected:Npn \__debug_patch_args_cs:nNNnn #1#2#3#4#5
+ {
+ \cs_set:Npn \__debug_tmp:w #4 {#5}
+ \exp_after:wN \__debug_patch_cs:nnNNnn \exp_after:wN
+ { \__debug_tmp:w #1 } { } #2 #3 {#4} { }
+ }
+ \cs_set_protected:Npn \__debug_patch_args_conditional:nNNnnn
+ #1#2#3#4#5#6
+ {
+ \cs_set:Npn \__debug_tmp:w #4 {#6}
+ \exp_after:wN \__debug_patch_conditional:nnNNnnn \exp_after:wN
+ { \__debug_tmp:w #1 } { } #2 #3 {#4} {#5} { }
+ }
+ }
+ { \cs_set_protected:Npn \__debug_patch_args:nNw #1 { } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Conditional processing and definitions}
%
% Underneath any predicate function (|_p|) or other conditional forms
@@ -2301,7 +2623,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Checking and patching (new) functions}
+% \subsection{Preliminaries for new functions}
%
% We provide two kinds of functions that can be used to define
% control sequences. On the one hand we have functions that check
@@ -2361,188 +2683,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\debug_log_functions_on:, \debug_log_functions_off:}
-% \begin{macro}[int]{\__debug_log:x, \__debug_suspend_log:, \__debug_resume_log:}
-% When debugging is not enabled at all (including in the format), the
-% \cs[index=debug_log_functions_on:]{debug_log_functions_on/off:}
-% functions simply produce errors, while \cs{__debug_suspend_log:} and
-% \cs{__debug_resume_log:} do nothing.
-% \begin{macrocode}
-\cs_set_protected:Npn \debug_log_functions_on:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_log_functions_on: }
- }
-\cs_set_protected:Npn \debug_log_functions_off:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_log_functions_off: }
- }
-\cs_set_protected:Npn \__debug_suspend_log: { }
-\cs_set_protected:Npn \__debug_resume_log: { }
-% \end{macrocode}
-% Otherwise, they set up \cs{__debug_log:x},
-% \cs{__debug_suspend_log:}, and \cs{__debug_resume_log:} to have the
-% following behaviour. The function \cs{__debug_log:x} is used to
-% write some information to the \texttt{log} file in case the
-% \texttt{log-function} option is active and to otherwise ignore its
-% argument. Using this function rather than directly using
-% \cs{iow_log:x} allows for \cs{__debug_suspend_log:} which disables
-% such messages until the matching \cs{__debug_resume_log:}. These
-% two commands are used to improve the logging for datatypes with
-% multiple parts (currently only coffins). They should come in pairs,
-% which can be nested. The function \cs{exp_not:o} is defined in
-% \pkg{l3expan} later on but \cs{__debug_suspend_log:} and
-% \cs{__debug_resume_log:} are not used before that point. Once
-% everything is defined, turn logging on or off depending on what
-% option was given.
-% \begin{macrocode}
-%<*package>
-\tex_ifodd:D \l at expl@enable at debug@bool
- \cs_set_protected:Npn \debug_log_functions_on:
- {
- \cs_set_protected:Npn \__debug_log:x { \iow_log:x }
- \cs_set_protected:Npn \__debug_suspend_log:
- {
- \cs_set_protected:Npx \__debug_resume_log:
- {
- \cs_set_protected:Npn \__debug_resume_log:
- { \exp_not:o { \__debug_resume_log: } }
- \cs_set_protected:Npn \__debug_log:x
- { \exp_not:o { \__debug_log:x } }
- }
- \cs_set_protected:Npn \__debug_log:x { \use_none:n }
- }
- \cs_set_protected:Npn \__debug_resume_log: { }
- }
- \cs_set_protected:Npn \debug_log_functions_off:
- {
- \cs_set_protected:Npn \__debug_log:x { \use_none:n }
- \cs_set_protected:Npn \__debug_suspend_log: { }
- \cs_set_protected:Npn \__debug_resume_log: { }
- }
- \tex_ifodd:D \l at expl@log at functions@bool
- \debug_log_functions_on:
- \else:
- \debug_log_functions_off:
- \fi:
-\fi:
-%</package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\__debug_patch:nnNw}
-% \begin{macro}[aux,EXP]{\__debug_patch_case:N}
-% \begin{macro}[aux]
-% {
-% \__debug_patch_param:NNnnNnp,
-% \__debug_patch_cs:nnNNnn,
-% \__debug_patch_conditional:nnNNnnn
-% }
-% When debugging is not enabled, \cs{__debug_patch:nnNw} throws the
-% patch away. Otherwise it can be followed by \cs{cs_new:Npn} or
-% \cs{prg_new_conditional:Npnn} or their protected counterparts. In
-% each case, grab the name of the function to be defined and its
-% parameters using \cs{__debug_patch_param:w} then insert tokens
-% before and after the definition. Of course for a conditional one
-% should likely not insert anything after the code.
-% \begin{macrocode}
-\cs_set_protected:Npn \__debug_patch:nnNw #1#2 { }
-%<*package>
-\tex_ifodd:D \l at expl@enable at debug@bool
- \cs_set_protected:Npn \__debug_patch:nnNw #1#2#3
- {
- \tex_ifcase:D \__debug_patch_case:N #3
- \or:
- \exp_after:wN \__debug_patch_param:NNnnNnp
- \exp_after:wN \__debug_patch_cs:nnNNnn
- \else:
- \exp_after:wN \__debug_patch_param:NNnnNnp
- \exp_after:wN \__debug_patch_conditional:nnNNnnn
- \fi:
- \use_none:nn {#1} {#2} #3
- }
- \cs_set:Npn \__debug_patch_case:N #1
- {
- \if_meaning:w #1 \cs_new_protected:Npn 1~ \fi:
- \if_meaning:w #1 \cs_new:Npn 1~ \fi:
- \if_meaning:w #1 \cs_set_protected:Npn 1~ \fi:
- \if_meaning:w #1 \cs_set:Npn 1~ \fi:
- \if_meaning:w #1 \cs_gset_protected:Npn 1~ \fi:
- \if_meaning:w #1 \cs_gset:Npn 1~ \fi:
- \if_meaning:w #1 \prg_new_protected_conditional:Npnn 2~ \fi:
- \if_meaning:w #1 \prg_new_conditional:Npnn 2~ \fi:
- 0~ %
- \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
- { \token_to_str:N #1 }
- }
- \cs_set_protected:Npn \__debug_patch_param:NNnnNnp #1#2#3#4#5#6#7#
- { #1 {#3} {#4} #5 #6 {#7} }
- \cs_set_protected:Npn \__debug_patch_cs:nnNNnn #1#2#3#4#5#6
- { #3 #4 #5 { #1 #6 #2 } }
- \cs_set_protected:Npn \__debug_patch_conditional:nnNNnnn
- #1#2#3#4#5#6#7
- { #3 #4 #5 {#6} { #1 #7 #2 } }
-\fi:
-%</package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\__debug_patch_args:nNw}
-% \begin{macro}[aux]
-% {
-% \__debug_tmp:w,
-% \__debug_patch_args_param:NNnNnp,
-% \__debug_patch_args_cs:nNNnn,
-% \__debug_patch_args_conditional:nNNnnn
-% }
-% See \cs{__debug_patch:nnNw}. The first argument is something like
-% |{#1}{(#2)}|. Define a temporary macro using the \meta{parameters}
-% and \meta{code} of the definition that follows, then expand that
-% temporary macro in front of the first argument to obtain new
-% \meta{code}. Then perform the definition as if that new \meta{code}
-% was directly typed in the file. To make it easy to expand in the
-% definition, treat it as a \enquote{pre}-code to an empty definition.
-% \begin{macrocode}
-\cs_set_protected:Npn \__debug_patch_args:nNw #1 { }
-%<*package>
-\tex_ifodd:D \l at expl@enable at debug@bool
- \cs_set_protected:Npn \__debug_patch_args:nNw #1#2
- {
- \tex_ifcase:D \__debug_patch_case:N #2
- \or:
- \exp_after:wN \__debug_patch_args_param:NNnNnp
- \exp_after:wN \__debug_patch_args_cs:nNNnn
- \else:
- \exp_after:wN \__debug_patch_args_param:NNnNnp
- \exp_after:wN \__debug_patch_args_conditional:nNNnnn
- \fi:
- \use_none:n {#1} #2
- }
- \cs_set_protected:Npn \__debug_patch_args_param:NNnNnp #1#2#3#4#5#6#
- { #1 {#3} #4 #5 {#6} }
- \cs_set_protected:Npn \__debug_patch_args_cs:nNNnn #1#2#3#4#5
- {
- \cs_set:Npn \__debug_tmp:w #4 {#5}
- \exp_after:wN \__debug_patch_cs:nnNNnn \exp_after:wN
- { \__debug_tmp:w #1 } { } #2 #3 {#4} { }
- }
- \cs_set_protected:Npn \__debug_patch_args_conditional:nNNnnn
- #1#2#3#4#5#6
- {
- \cs_set:Npn \__debug_tmp:w #4 {#6}
- \exp_after:wN \__debug_patch_conditional:nnNNnnn \exp_after:wN
- { \__debug_tmp:w #1 } { } #2 #3 {#4} {#5} { }
- }
-\fi:
-%</package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}[int]{\__chk_if_free_cs:N, \__chk_if_free_cs:c}
% This command is called by \cs{cs_new_nopar:Npn} and \cs{cs_new_eq:NN}
% \emph{etc.}\
@@ -2567,49 +2707,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\debug_check_declarations_on:, \debug_check_declarations_off:}
-% \begin{macro}[int]{\__chk_if_exist_var:N}
-% When debugging is not active these two user functions produce an
-% error. Otherwise they set up \cs{__chk_if_exist_var:N}, a function
-% which when \texttt{check-declarations} is active tests that a given
-% variable is defined.
-% \begin{macrocode}
-\cs_set_protected:Npn \debug_check_declarations_on:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_check_declarations_on: }
- }
-\cs_set_protected:Npn \debug_check_declarations_off:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_check_declarations_off: }
- }
-%<*package>
-\tex_ifodd:D \l at expl@enable at debug@bool
- \cs_set_protected:Npn \debug_check_declarations_on:
- {
- \cs_set_protected:Npn \__chk_if_exist_var:N ##1
- {
- \cs_if_exist:NF ##1
- {
- \__msg_kernel_error:nnx { check } { non-declared-variable }
- { \token_to_str:N ##1 }
- }
- }
- }
- \cs_set_protected:Npn \debug_check_declarations_off:
- { \cs_set_protected:Npn \__chk_if_exist_var:N ##1 { } }
- \tex_ifodd:D \l at expl@check at declarations@bool
- \debug_check_declarations_on:
- \else:
- \debug_check_declarations_off:
- \fi:
-\fi:
-%</package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}[int]{\__chk_if_exist_cs:N, \__chk_if_exist_cs:c}
% This function issues an error message when the control sequence
% in its argument does not exist.
Modified: trunk/l3kernel/l3box.dtx
===================================================================
--- trunk/l3kernel/l3box.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3box.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -2003,8 +2003,14 @@
%
% \begin{macro}[deprecated = 2018-12-31]{\box_resize:Nnn, \box_resize:cnn}
% \begin{macrocode}
-\cs_new_eq:NN \box_resize:Nnn \box_resize_to_wd_and_ht_plus_dp:Nnn
-\cs_new_eq:NN \box_resize:cnn \box_resize_to_wd_and_ht_plus_dp:cnn
+\__debug_deprecation:nnNNpn
+ { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:Nnn }
+\cs_new_protected:Npn \box_resize:Nnn
+ { \box_resize_to_wd_and_ht_plus_dp:Nnn }
+\__debug_deprecation:nnNNpn
+ { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:cnn }
+\cs_new_protected:Npn \box_resize:cnn
+ { \box_resize_to_wd_and_ht_plus_dp:cnn }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/l3candidates.dtx
===================================================================
--- trunk/l3kernel/l3candidates.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3candidates.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -98,6 +98,19 @@
% \texttt{enable-debug}.
% \end{function}
%
+% \begin{function}[added = 2017-07-16]
+% {\debug_deprecation_on:, \debug_deprecation_off:}
+% \begin{syntax}
+% \cs{debug_deprecation_on:}
+% \cs{debug_deprecation_off:}
+% \end{syntax}
+% Turn on and off within a group some code that makes
+% soon-to-be-deprecated commands to produce errors. This allows
+% testing code even if it relies on other packages: load all other
+% packages, call \cs{debug_deprecation_on:}, and load the code that
+% one is interested in testing.
+% \end{function}
+%
% \begin{function}[added = 2017-07-14]
% {\debug_log_functions_on:, \debug_log_functions_off:}
% \begin{syntax}
Modified: trunk/l3kernel/l3coffins.dtx
===================================================================
--- trunk/l3kernel/l3coffins.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3coffins.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -507,20 +507,38 @@
% data structures. These are created globally, as there is a need to
% avoid any strange effects if the coffin is created inside a group.
% This means that the usual rule about \cs[no-index]{l_\ldots} variables has
-% to be broken.
+% to be broken. The \cs{__debug_suspend_log:} and
+% \cs{__debug_resume_log:} functions prevent \cs{prop_clear_new:c}
+% from writing useless information to the log file; however they only
+% exist if debugging is enabled.
% \begin{macrocode}
-\cs_new_protected:Npn \coffin_new:N #1
+\__debug:TF
{
- \box_new:N #1
- \__debug_suspend_log:
- \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
- \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
- \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
- \c_@@_corners_prop
- \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
- \c_@@_poles_prop
- \__debug_resume_log:
+ \cs_new_protected:Npn \coffin_new:N #1
+ {
+ \box_new:N #1
+ \__debug_suspend_log:
+ \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
+ \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
+ \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
+ \c_@@_corners_prop
+ \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
+ \c_@@_poles_prop
+ \__debug_resume_log:
+ }
}
+ {
+ \cs_new_protected:Npn \coffin_new:N #1
+ {
+ \box_new:N #1
+ \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
+ \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
+ \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
+ \c_@@_corners_prop
+ \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
+ \c_@@_poles_prop
+ }
+ }
\cs_generate_variant:Nn \coffin_new:N { c }
% \end{macrocode}
% \end{macro}
Modified: trunk/l3kernel/l3deprecation.dtx
===================================================================
--- trunk/l3kernel/l3deprecation.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3deprecation.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -52,13 +52,6 @@
% A few commands have had to be deprecated over the years. This module
% defines deprecated and deleted commands to produce an error.
%
-% \begin{macro}{\deprecation_error:}
-% \begin{syntax}
-% \cs{deprecation_error:}
-% \end{syntax}
-% Defines commands that will soon become deprecated to produce errors.
-% \end{macro}
-%
% \end{documentation}
%
% \begin{implementation}
@@ -124,45 +117,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\deprecation_error:}
-% Some commands were more recently deprecated and not yet removed;
-% only make these into errors if the user requests it. This allows
-% testing code even if it relies on other packages: load all other
-% packages, call \cs{deprecation_error:}, and load the code that one is
-% interested in testing.
-%
-% One of the deprecated syntaxes is within floating point expressions;
-% to keep related code in the same place we define in \pkg{l3fp-parse}
-% a version of \cs{__fp_parse_round:Nw} producing an error.
% \begin{macrocode}
-\cs_new_protected:Npn \deprecation_error:
- {
- \@@_error:Nnn \tl_to_lowercase:n { } { 2017-12-31 }
- \@@_error:Nnn \tl_to_uppercase:n { } { 2017-12-31 }
- \@@_error:Nnn \ior_get_str:NN { \ior_str_get:NN } { 2017-12-31 }
- \@@_error:Nnn \box_resize:Nnn { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2018-12-31 }
- \@@_error:Nnn \box_resize:cnn { \box_resize_to_wd_and_ht_plus_dp:cnn } { 2018-12-31 }
- \@@_error:Nnn \c_minus_one { - 1 } { 2018-12-31 }
- \@@_error:Nnn \sort_ordered: { \sort_return_same: } { 2018-12-31 }
- \@@_error:Nnn \sort_reversed: { \sort_return_swapped: } { 2018-12-31 }
- \@@_error:Nnn \g_file_current_name_tl { \g_file_curr_name_str } { 2018-12-31 }
- \@@_error:Nnn \file_add_path:nN { \file_get_full_name:nN } { 2018-12-31 }
- \@@_error:Nnn \file_path_include:n
- { \seq_put_right:Nn \l_file_search_path_seq } { 2018-12-31 }
- \@@_error:Nnn \file_path_remove:n
- { \seq_remove_all:Nn \l_file_search_path_seq } { 2018-12-31 }
- \@@_error:Nnn \file_list: { \file_log_list: } { 2018-12-31 }
- \@@_error:Nnn \ior_list_streams: { \ior_show_list: } { 2018-12-31 }
- \@@_error:Nnn \ior_log_streams: { \ior_log_list: } { 2018-12-31 }
- \@@_error:Nnn \iow_list_streams: { \iow_show_list: } { 2018-12-31 }
- \@@_error:Nnn \iow_log_streams: { \iow_log_list: } { 2018-12-31 }
- \cs_set_eq:NN \__fp_parse_round:Nw \__fp_parse_round_deprecation_error:Nw
- \cs_set_eq:NN \deprecation_error: \scan_stop:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
%</initex|package>
% \end{macrocode}
%
Modified: trunk/l3kernel/l3file.dtx
===================================================================
--- trunk/l3kernel/l3file.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3file.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -2365,56 +2365,56 @@
%
% \begin{variable}[deprecated = 2018-12-31]{\g_file_current_name_tl}
% For removal after 2018-12-31.
+% Contrarily to most other deprecated commands this is expandable
+% so we need to put code by hand in two token lists. We use
+% \cs{tex_def:D} directly because \cs{g_file_current_name_tl} is made
+% outer by \cs{debug_deprecation_on:}.
% \begin{macrocode}
\tl_new:N \g_file_current_name_tl
\tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str }
+\__debug:TF
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ {
+ \__deprecation_error:Nnn \g_file_current_name_tl
+ { \g_file_curr_name_str } { 2018-12-31 }
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ { \tex_def:D \g_file_current_name_tl { \g_file_curr_name_str } }
+ }
+ { }
% \end{macrocode}
% \end{variable}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_path_include:n}
% \begin{macro}[deprecated = 2018-12-31]{\file_path_remove:n}
-% \begin{macro}[deprecated = 2018-12-31, aux]{\__file_path_include:n}
% Wrapper functions to manage the search path.
% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_put_right:Nn \l_file_search_path_seq }
\cs_new_protected:Npn \file_path_include:n #1
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_include:n }
- {
- \token_to_str:N \seq_put_right:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
- }
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_if_in:NVF \l_file_search_path_seq \l__file_full_name_str
{ \seq_put_right:NV \l_file_search_path_seq \l__file_full_name_str }
}
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_remove_all:Nn \l_file_search_path_seq }
\cs_new_protected:Npn \file_path_remove:n #1
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_remove:n }
- {
- \token_to_str:N \seq_remove_all:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
- }
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_remove_all:NV \l_file_search_path_seq \l__file_full_name_str
}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_add_path:nN}
% For removal after 2018-12-31.
% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_get_full_name:nN }
\cs_new_protected:Npn \file_add_path:nN #1#2
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_add_path:nN }
- { \token_to_str:N \file_get_full_name:nN }
\file_get_full_name:nN {#1} #2
\str_if_empty:NT #2
{ \tl_set:Nn #2 { \q_no_value } }
@@ -2425,30 +2425,16 @@
% \begin{macro}[added = 2012-06-24, updated = 2012-07-31, deprecated=2017-12-31]{\ior_get_str:NN}
% For removal after 2017-12-31.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_get_str:NN
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \ior_get_str:NN }
- { \token_to_str:N \ior_str_get:NN }
- \cs_gset_eq:NN \ior_get_str:NN \ior_str_get:NN
- \ior_str_get:NN
- }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \ior_str_get:NN }
+\cs_new_protected:Npn \ior_get_str:NN { \ior_str_get:NN }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_list:}
% Renamed to \cs{file_log_list:}. For removal after 2018-12-31.
% \begin{macrocode}
-\cs_new_protected:Npn \file_list:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_list: }
- { \token_to_str:N \file_log_list: }
- \cs_gset_eq:NN \file_list: \file_log_list:
- \file_log_list:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_log_list: }
+\cs_new_protected:Npn \file_list: { \file_log_list: }
% \end{macrocode}
% \end{macro}
%
@@ -2456,42 +2442,14 @@
% {\ior_list_streams:, \ior_log_streams:, \iow_list_streams:, \iow_log_streams:}
% These got a more consistent naming.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_list_streams: }
- { \token_to_str:N \ior_show_list: }
- \cs_gset_eq:NN \ior_list_streams: \ior_show_list:
- \ior_show_list:
- }
-\cs_new_protected:Npn \ior_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_log_streams: }
- { \token_to_str:N \ior_log_list: }
- \cs_gset_eq:NN \ior_log_streams: \ior_log_list:
- \ior_log_list:
- }
-\cs_new_protected:Npn \iow_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_list_streams: }
- { \token_to_str:N \iow_show_list: }
- \cs_gset_eq:NN \iow_list_streams: \iow_show_list:
- \iow_show_list:
- }
-\cs_new_protected:Npn \iow_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_log_streams: }
- { \token_to_str:N \iow_log_list: }
- \cs_gset_eq:NN \iow_log_streams: \iow_log_list:
- \iow_log_list:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_show_list: }
+\cs_new_protected:Npn \ior_list_streams: { \ior_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_log_list: }
+\cs_new_protected:Npn \ior_log_streams: { \ior_log_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_show_list: }
+\cs_new_protected:Npn \iow_list_streams: { \iow_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_log_list: }
+\cs_new_protected:Npn \iow_log_streams: { \iow_log_list: }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/l3fp-round.dtx
===================================================================
--- trunk/l3kernel/l3fp-round.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3fp-round.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -86,6 +86,7 @@
% \begin{macro}[aux, EXP]
% {
% \@@_parse_word_round:N, \@@_parse_round:Nw,
+% \@@_parse_round_no_error:Nw,
% \@@_parse_round_deprecation_error:Nw
% }
% \begin{macro}[aux, deprecated = 2017-12-31]{round+, round0, round-}
@@ -95,9 +96,8 @@
% set up. When \pkg{l3doc} complains, remove the syntax by
% removing everything until the last \cs{fi:} in
% \cs{@@_parse_word_round:N} (and getting rid of the unused
-% definitions of \cs{@@_parse_round:Nw} and
-% \cs{@@_parse_round_deprecation_error:Nw} here and in
-% \pkg{l3deprecation}, perhaps also of the |fp-deprecated| error).
+% definitions of \cs{@@_parse_round:Nw} and so on, as well as the
+% |fp-deprecated| error in \pkg{l3fp-parse}).
% \begin{macrocode}
\cs_new:Npn \@@_parse_word_round:N #1#2
{
@@ -116,18 +116,36 @@
\@@_round_o:Nw \@@_round_to_nearest:NNN #1
#2
}
-\cs_new:Npn \@@_parse_round:Nw
- #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 }
-\cs_new:Npn \@@_parse_round_deprecation_error:Nw
- #1 #2 \@@_round_to_nearest:NNN #3#4
+\__debug:TF
{
- \@@_error:nnfn { fp-deprecated } { round#4() }
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
{
- \str_case:nn {#2}
- { { + } { ceil } { 0 } { trunc } { - } { floor } }
- } { }
- #2 #1 #3
+ \cs_set_eq:NN \@@_parse_round:Nw
+ \@@_parse_round_deprecation_error:Nw
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ {
+ \cs_set_eq:NN \@@_parse_round:Nw
+ \@@_parse_round_no_error:Nw
+ }
+ \cs_new:Npn \@@_parse_round_deprecation_error:Nw
+ #1 #2 \@@_round_to_nearest:NNN #3#4
+ {
+ \@@_error:nnfn { fp-deprecated } { round#4() }
+ {
+ \str_case:nn {#2}
+ { { + } { ceil } { 0 } { trunc } { - } { floor } }
+ } { }
+ #2 #1 #3
+ }
+ \cs_new:Npn \@@_parse_round_no_error:Nw
+ #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 }
+ \cs_new_eq:NN \@@_parse_round:Nw \@@_parse_round_no_error:Nw
}
+ {
+ \cs_new:Npn \@@_parse_round:Nw
+ #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
Modified: trunk/l3kernel/l3int.dtx
===================================================================
--- trunk/l3kernel/l3int.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3int.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -2480,13 +2480,24 @@
% \begin{variable}[deprecated = 2018-12-31]{\c_minus_one}
% The actual allocation mechanism is in \pkg{l3alloc}; it requires
% \cs{c_one} to be defined. In package mode, reuse \tn{m at ne}.
+% We also store in two global token lists some code for
+% \cs{debug_deprecation_on:} and \cs{debug_deprecation_off:}. For the
+% latter, we need to locally set \cs{c_minus_one} back to the constant
+% hence use a private name. We use \cs{tex_let:D} directly because
+% \cs{c_minus_one} (as all deprecated commands) is made outer by
+% \cs{debug_deprecation_on:}.
% \begin{macrocode}
-%<*package>
-\cs_new_eq:NN \c_minus_one \m at ne
-%</package>
-%<*initex>
-\int_const:Nn \c_minus_one { -1 }
-%</initex>
+%<package>\cs_gset_eq:NN \c__deprecation_minus_one \m at ne
+%<initex>\int_const:Nn \c__deprecation_minus_one { -1 }
+\cs_new_eq:NN \c_minus_one \c__deprecation_minus_one
+\__debug:TF
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ { \__deprecation_error:Nnn \c_minus_one { -1 } { 2018-12-31 } }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ { \tex_let:D \c_minus_one \c__deprecation_minus_one }
+ }
+ { }
% \end{macrocode}
% \end{variable}
%
Modified: trunk/l3kernel/l3sort.dtx
===================================================================
--- trunk/l3kernel/l3sort.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3sort.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -1078,24 +1078,10 @@
% \begin{macro}[deprecated = 2018-12-31]{\sort_ordered:, \sort_reversed:}
% These functions were renamed for consistency.
% \begin{macrocode}
-\cs_new_protected:Npn \sort_ordered:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \sort_ordered: }
- { \token_to_str:N \sort_return_same: }
- \cs_gset_eq:NN \sort_ordered: \sort_return_same:
- \sort_return_same:
- }
-\cs_new_protected:Npn \sort_reversed:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \sort_reversed: }
- { \token_to_str:N \sort_return_swapped: }
- \cs_gset_eq:NN \sort_reversed: \sort_return_swapped:
- \sort_return_swapped:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \sort_return_same: }
+\cs_new_protected:Npn \sort_ordered: { \sort_return_same: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \sort_return_swapped: }
+\cs_new_protected:Npn \sort_reversed: { \sort_return_swapped: }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/l3tl.dtx
===================================================================
--- trunk/l3kernel/l3tl.dtx 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/l3tl.dtx 2017-07-16 21:05:04 UTC (rev 7380)
@@ -2964,24 +2964,10 @@
% \begin{macro}[deprecated=2017-12-31]{\tl_to_lowercase:n, \tl_to_uppercase:n}
% For removal after 2017-12-31.
% \begin{macrocode}
-\cs_new_protected:Npn \tl_to_lowercase:n #1
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \tl_to_lowercase:n }
- { }
- \cs_gset_eq:NN \tl_to_lowercase:n \tex_lowercase:D
- \tex_lowercase:D {#1}
- }
-\cs_new_protected:Npn \tl_to_uppercase:n #1
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \tl_to_uppercase:n }
- { }
- \cs_gset_eq:NN \tl_to_uppercase:n \tex_uppercase:D
- \tex_uppercase:D {#1}
- }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \tex_lowercase:D }
+\cs_new_protected:Npn \tl_to_lowercase:n #1 { \tex_lowercase:D {#1} }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \tex_uppercase:D }
+\cs_new_protected:Npn \tl_to_uppercase:n #1 { \tex_uppercase:D {#1} }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/testfiles/m3deprecation001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3deprecation001.luatex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3deprecation001.luatex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -123,14 +123,15 @@
* LaTeX warning: "kernel/deprecated-command"
*
* The deprecated command '\tl_to_lowercase:n' has been or will be removed on
-* 2017-12-31.
+* 2017-12-31. Use instead '\tex_lowercase:D '.
*************************************************
aa
+bb
! Undefined control sequence.
<argument> \LaTeX3 error:
The deprecated command '\tl_to_lowercase:n' has been or will be
-l. ... \tl_to_lowercase:n
- { \TYPE { Aa } }
+l. ... \tl_to_lowercase:n
+ { \TYPE { Cc } }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
@@ -141,19 +142,51 @@
! LaTeX error: "kernel/deprecated-command"
!
! The deprecated command '\tl_to_lowercase:n' has been or will be removed on
-! 2017-12-31.
+! 2017-12-31. Use instead '\tex_lowercase:D '.
!
! See the LaTeX3 documentation for further information.
!
! Type <return> to continue.
!...............................................
-l. ... \tl_to_lowercase:n
- { \TYPE { Aa } }
+l. ... \tl_to_lowercase:n
+ { \TYPE { Cc } }
|'''''''''''''''''''''''''''''''''''''''''''''''
| LaTeX does not know anything more about this error, sorry.
|
| Try typing <return> to proceed.
| If that doesn't work, type X <return> to quit.
|...............................................
-Aa
-aa
+Cc
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ The deprecated command '\tl_to_lowercase:n' has been or will be
+l. ... \tl_to_lowercase:n
+ { \TYPE { Dd } }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+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.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! LaTeX error: "kernel/deprecated-command"
+!
+! The deprecated command '\tl_to_lowercase:n' has been or will be removed on
+! 2017-12-31. Use instead '\tex_lowercase:D '.
+!
+! See the LaTeX3 documentation for further information.
+!
+! Type <return> to continue.
+!...............................................
+l. ... \tl_to_lowercase:n
+ { \TYPE { Dd } }
+|'''''''''''''''''''''''''''''''''''''''''''''''
+| LaTeX does not know anything more about this error, sorry.
+|
+| Try typing <return> to proceed.
+| If that doesn't work, type X <return> to quit.
+|...............................................
+Dd
+ee
+ff
+gg
Modified: trunk/l3kernel/testfiles/m3deprecation001.lvt
===================================================================
--- trunk/l3kernel/testfiles/m3deprecation001.lvt 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3deprecation001.lvt 2017-07-16 21:05:04 UTC (rev 7380)
@@ -12,11 +12,19 @@
\cs_new:Npn \test: { \str_case:nnn { } { } { }}
\tl_set:Nx \l_tmpa_tl { \c_job_name_tl }
\xetex_if_engine:TF { } { }
-\tl_to_lowercase:n { \TYPE { Aa } }
\group_begin:
- \deprecation_error:
\tl_to_lowercase:n { \TYPE { Aa } }
+ \tl_to_lowercase:n { \TYPE { Bb } }
+ \group_begin:
+ \debug_deprecation_on:
+ \tl_to_lowercase:n { \TYPE { Cc } }
+ \tl_to_lowercase:n { \TYPE { Dd } }
+ \group_end:
+ \tl_to_lowercase:n { \TYPE { Ee } }
+ \debug_deprecation_on:
+ \debug_deprecation_off:
+ \tl_to_lowercase:n { \TYPE { Ff } }
\group_end:
-\tl_to_lowercase:n { \TYPE { Aa } }
+\tl_to_lowercase:n { \TYPE { Gg } }
\END
Modified: trunk/l3kernel/testfiles/m3deprecation001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3deprecation001.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3deprecation001.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -123,14 +123,15 @@
* LaTeX warning: "kernel/deprecated-command"
*
* The deprecated command '\tl_to_lowercase:n' has been or will be removed on
-* 2017-12-31.
+* 2017-12-31. Use instead '\tex_lowercase:D '.
*************************************************
aa
+bb
! Undefined control sequence.
<argument> \LaTeX3 error:
The deprecated command '\tl_to_lowercase:n' has b...
-l. ... \tl_to_lowercase:n
- { \TYPE { Aa } }
+l. ... \tl_to_lowercase:n
+ { \TYPE { Cc } }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
@@ -141,19 +142,51 @@
! LaTeX error: "kernel/deprecated-command"
!
! The deprecated command '\tl_to_lowercase:n' has been or will be removed on
-! 2017-12-31.
+! 2017-12-31. Use instead '\tex_lowercase:D '.
!
! See the LaTeX3 documentation for further information.
!
! Type <return> to continue.
!...............................................
-l. ... \tl_to_lowercase:n
- { \TYPE { Aa } }
+l. ... \tl_to_lowercase:n
+ { \TYPE { Cc } }
|'''''''''''''''''''''''''''''''''''''''''''''''
| LaTeX does not know anything more about this error, sorry.
|
| Try typing <return> to proceed.
| If that doesn't work, type X <return> to quit.
|...............................................
-Aa
-aa
+Cc
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ The deprecated command '\tl_to_lowercase:n' has b...
+l. ... \tl_to_lowercase:n
+ { \TYPE { Dd } }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+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.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! LaTeX error: "kernel/deprecated-command"
+!
+! The deprecated command '\tl_to_lowercase:n' has been or will be removed on
+! 2017-12-31. Use instead '\tex_lowercase:D '.
+!
+! See the LaTeX3 documentation for further information.
+!
+! Type <return> to continue.
+!...............................................
+l. ... \tl_to_lowercase:n
+ { \TYPE { Dd } }
+|'''''''''''''''''''''''''''''''''''''''''''''''
+| LaTeX does not know anything more about this error, sorry.
+|
+| Try typing <return> to proceed.
+| If that doesn't work, type X <return> to quit.
+|...............................................
+Dd
+ee
+ff
+gg
Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3643,8 +3643,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5350,7 +5351,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5340,7 +5341,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5340,7 +5341,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5338,7 +5339,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3641,8 +3641,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5328,7 +5329,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3643,8 +3643,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5350,7 +5351,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5340,7 +5341,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5340,7 +5341,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3631,8 +3631,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5338,7 +5339,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-16 20:27:20 UTC (rev 7379)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-16 21:05:04 UTC (rev 7380)
@@ -3641,8 +3641,9 @@
Defining \__fp_parse_word_floor:N on line ...
Defining \__fp_parse_word_ceil:N on line ...
Defining \__fp_parse_word_round:N on line ...
+Defining \__fp_parse_round_deprecation_error:Nw on line ...
+Defining \__fp_parse_round_no_error:Nw on line ...
Defining \__fp_parse_round:Nw on line ...
-Defining \__fp_parse_round_deprecation_error:Nw on line ...
Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
@@ -5328,7 +5329,6 @@
Defining \sys_if_output_pdf_p: on line ...
Defining \c_sys_output_str on line ...
Defining \__deprecation_error:Nnn on line ...
-Defining \deprecation_error: on line ...
Defining \mode_leave_vertical: on line ...
Defining \box_clip:N on line ...
Defining \box_clip:c on line ...
More information about the latex3-commits
mailing list