[latex3-commits] [latex3/latex3] main: Add opt. to mark fns as deprecated in l3doc (a95487f73)
github at latex-project.org
github at latex-project.org
Mon Nov 27 10:30:22 CET 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/a95487f73b378dc267d445d215393f82fdaca875
>---------------------------------------------------------------
commit a95487f73b378dc267d445d215393f82fdaca875
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Nov 26 23:08:34 2023 +0000
Add opt. to mark fns as deprecated in l3doc
See #1345.
>---------------------------------------------------------------
a95487f73b378dc267d445d215393f82fdaca875
l3kernel/l3deprecation.dtx | 55 +++++++++++++++++++++++-----------------------
l3kernel/l3doc.dtx | 13 ++++++++---
2 files changed, 38 insertions(+), 30 deletions(-)
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 98f55c3c8..a6f3938bf 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -438,7 +438,7 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}[EXP]{\cs_argument_spec:N}
+% \begin{macro}[EXP, deprecated]{\cs_argument_spec:N}
% For the present, do not deprecate fully as \LaTeXe{} will need to catch
% up: one for Fall 2022.
% \begin{macrocode}
@@ -449,7 +449,7 @@
%
% \subsection{Deprecated \pkg{l3file} functions}
%
-% \begin{macro}
+% \begin{macro}[deprecated]
% {
% \iow_shipout_x:Nn, \iow_shipout_x:Nx,
% \iow_shipout_x:cn, \iow_shipout_x:cx
@@ -469,8 +469,8 @@
%<@@=keys>
% \end{macrocode}
%
-% \begin{macro}{.str_set_x:N, .str_set_x:c}
-% \begin{macro}{.str_gset_x:N, .str_gset_x:c}
+% \begin{macro}[deprecated]{.str_set_x:N, .str_set_x:c}
+% \begin{macro}[deprecated]{.str_gset_x:N, .str_gset_x:c}
% \begin{macrocode}
\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1
{ \@@_variable_set:NnnN #1 { str } { } x }
@@ -484,8 +484,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{.tl_set_x:N, .tl_set_x:c}
-% \begin{macro}{.tl_gset_x:N, .tl_gset_x:c}
+% \begin{macro}[deprecated]{.tl_set_x:N, .tl_set_x:c}
+% \begin{macro}[deprecated]{.tl_gset_x:N, .tl_gset_x:c}
% \begin{macrocode}
\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:N } #1
{ \@@_variable_set:NnnN #1 { tl } { } x }
@@ -501,14 +501,15 @@
%
% \subsection{Deprecated \pkg{l3pdf} functions}
%
-% \begin{variable}{\g_@@_object_prop}
+% \begin{variable}[deprecated]{\g_@@_object_prop}
% For tracking objects.
% \begin{macrocode}
\prop_new:N \g_@@_object_prop
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx}
+% \begin{macro}[deprecated]
+% {\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-08-30 } { [\pdf_object_new:n] }
\cs_new_protected:Npn \pdf_object_new:nn #1#2
@@ -533,7 +534,7 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}[EXP, noTF]{\bool_case_true:n}
+% \begin{macro}[EXP, noTF, deprecated]{\bool_case_true:n}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case:n }
\cs_gset:Npn \bool_case_true:n { \bool_case:n }
@@ -552,7 +553,7 @@
%<@@=str>
% \end{macrocode}
%
-% \begin{macro}[EXP]
+% \begin{macro}[EXP, deprecated]
% {
% \str_lower_case:n, \str_lower_case:f,
% \str_upper_case:n, \str_upper_case:f,
@@ -574,7 +575,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]
+% \begin{macro}[EXP, deprecated]
% {\str_foldcase:n, \str_foldcase:V}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2020-10-17 } { \str_casefold:n }
@@ -584,7 +585,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]
+% \begin{macro}[EXP, deprecated]
% {\str_declare_eight_bit_encoding:nnn}
% This command was made internal, with one more argument. There is no
% easy way to compute a reasonable value for that extra argument so we
@@ -598,8 +599,8 @@
%
% \subsection{Deprecated \pkg{l3seq} functions}
%
-% \begin{macro}{\seq_indexed_map_inline:Nn}
-% \begin{macro}[EXP]{ \seq_indexed_map_function:NN}
+% \begin{macro}[deprecated]{\seq_indexed_map_inline:Nn}
+% \begin{macro}[EXP, deprecated]{ \seq_indexed_map_function:NN}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2020-06-18 } { \seq_map_indexed_inline:Nn }
\cs_gset_protected:Npn \seq_indexed_map_inline:Nn { \seq_map_indexed_inline:Nn }
@@ -609,14 +610,14 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\seq_mapthread_function:NNN}
+% \begin{macro}[deprecated]{\seq_mapthread_function:NNN}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-05-10 } { \seq_map_pairwise_function:NNN }
\cs_gset:Npn \seq_mapthread_function:NNN { \seq_map_pairwise_function:NNN }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
+% \begin{macro}[deprecated]{\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-10-26 } { \seq_set_map_e:NNn }
\cs_gset_protected:Npn \seq_set_map_x:NNn { \seq_set_map_e:NNn }
@@ -631,7 +632,7 @@
%<@@=sys>
% \end{macrocode}
%
-% \begin{macro}{\sys_load_deprecation:}
+% \begin{macro}[deprecated]{\sys_load_deprecation:}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2021-01-11 } { (no~longer~required) }
\cs_gset_protected:Npn \sys_load_deprecation: { }
@@ -640,8 +641,8 @@
%
% \subsection{Deprecated \pkg{l3text} functions}
%
-% \begin{macro}[EXP]{\text_titlecase:n}
-% \begin{macro}[EXP]{\text_titlecase:nn}
+% \begin{macro}[EXP, deprecated]{\text_titlecase:n}
+% \begin{macro}[EXP, deprecated]{\text_titlecase:nn}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-07-08 } { \text_titlecase_first:n }
\cs_gset:Npn \text_titlecase:n #1
@@ -659,7 +660,7 @@
%<@@=tl>
% \end{macrocode}
%
-% \begin{macro}
+% \begin{macro}[deprecated]
% {
% \tl_lower_case:n, \tl_lower_case:nn,
% \tl_upper_case:n, \tl_upper_case:nn,
@@ -687,7 +688,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[noTF]{\tl_case:Nn, \tl_case:cn}
+% \begin{macro}[noTF, deprecated]{\tl_case:Nn, \tl_case:cn}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:Nn }
\cs_gset:Npn \tl_case:Nn { \token_case_meaning:Nn }
@@ -703,7 +704,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tl_build_clear:N, \tl_build_gclear:N}
+% \begin{macro}[deprecated]{\tl_build_clear:N, \tl_build_gclear:N}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-10-18 } { \tl_build_begin:N }
\cs_new_protected:Npn \tl_build_clear:N { \tl_build_begin:N }
@@ -714,14 +715,14 @@
%
% \subsection{Deprecated \pkg{l3token} functions}
%
-% \begin{macro}[EXP]{\char_to_utfviii_bytes:n}
+% \begin{macro}[EXP, deprecated]{\char_to_utfviii_bytes:n}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { [ \codepoint_generate:nn ] }
\cs_gset:Npn \char_to_utfviii_bytes:n { \__kernel_codepoint_to_bytes:n }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\char_to_nfd:N, \char_to_nfd:n}
+% \begin{macro}[EXP, deprecated]{\char_to_nfd:N, \char_to_nfd:n}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_to_nfd:n }
\cs_gset:Npn \char_to_nfd:N #1 { \codepoint_to_nfd:n {`#1} }
@@ -730,7 +731,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]
+% \begin{macro}[EXP, deprecated]
% {
% \char_lower_case:N, \char_upper_case:N,
% \char_mixed_case:Nn, \char_fold_case:N,
@@ -757,7 +758,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]
+% \begin{macro}[EXP, deprecated]
% {
% \char_lowercase:N, \char_titlecase:N, \char_uppercase:N,
% \char_foldcase:N,
@@ -786,7 +787,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF]
+% \begin{macro}[TF, deprecated]
% {
% \peek_catcode_ignore_spaces:N, \peek_catcode_remove_ignore_spaces:N,
% \peek_charcode_ignore_spaces:N, \peek_charcode_remove_ignore_spaces:N,
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 993f06aa2..8d5f00b02 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -695,6 +695,7 @@ and all files in that bundle must be distributed together.
%
% \begin{variable}
% {
+% \l_@@_macro_deprecated_bool ,
% \l_@@_macro_internal_bool,
% \l_@@_macro_TF_bool,
% \l_@@_macro_pTF_bool,
@@ -709,6 +710,7 @@ and all files in that bundle must be distributed together.
% environments. We initialize \cs{l_@@_override_module_tl} to avoid
% overriding module names by an empty name (meaning no module).
% \begin{macrocode}
+\bool_new:N \l_@@_macro_deprecated_bool
\bool_new:N \l_@@_macro_internal_bool
\bool_new:N \l_@@_macro_TF_bool
\bool_new:N \l_@@_macro_pTF_bool
@@ -2424,7 +2426,7 @@ and all files in that bundle must be distributed together.
} ,
added .code:n = { \@@_date_set_past:Nn \l_@@_date_added_tl {#1} },
updated .code:n = { \@@_date_set_past:Nn \l_@@_date_updated_tl {#1} } ,
- deprecated .code:n = {} , % A stub
+ deprecated .bool_set:N = \l_@@_macro_deprecated_bool ,
tested .code:n = { } ,
label .code:n =
{
@@ -2871,6 +2873,7 @@ and all files in that bundle must be distributed together.
\msg_warning:nnnn { l3doc } { deprecated-option }
{ aux } { function/macro }
} ,
+ deprecated .bool_set:N = \l_@@_macro_deprecated_bool ,
internal .value_forbidden:n = true ,
internal .code:n =
{ \bool_set_true:N \l_@@_macro_internal_bool } ,
@@ -2915,7 +2918,6 @@ and all files in that bundle must be distributed together.
} ,
added .code:n = {} , % TODO
updated .code:n = {} , % TODO
- deprecated .code:n = {} , % A stub
verb .bool_set:N = \l_@@_names_verb_bool ,
module .tl_set:N = \l_@@_override_module_tl ,
documented-as .tl_set:N = \l_@@_macro_documented_tl ,
@@ -2958,6 +2960,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_macro_init:
{
\int_incr:N \l_@@_nested_macro_int
+ \bool_set_false:N \l_@@_macro_deprecated_bool
\bool_set_false:N \l_@@_macro_internal_bool
\bool_set_false:N \l_@@_macro_TF_bool
\bool_set_false:N \l_@@_macro_pTF_bool
@@ -3379,7 +3382,11 @@ and all files in that bundle must be distributed together.
{
\seq_gset_filter:NNn \g_@@_nested_names_seq
\g_@@_nested_names_seq
- { ! \@@_if_macro_internal_p:n {##1} }
+ {
+ ! \bool_lazy_or_p:nn
+ { \@@_if_macro_internal_p:n {##1} }
+ { \l_@@_macro_deprecated_bool }
+ }
\seq_if_empty:NF \g_@@_nested_names_seq
{
\int_set:Nn \l_@@_tmpa_int
More information about the latex3-commits
mailing list.