diff options
author | Karl Berry <karl@freefriends.org> | 2018-05-13 21:56:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-05-13 21:56:47 +0000 |
commit | e6d38f40f0132914020c723840be3489c4b692f0 (patch) | |
tree | dac2c281e93cba461b3ff2c1e4b8e34aad401716 /Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx | |
parent | 55be422dc01e60cfae781a9a4a310a96c9e99256 (diff) |
l3 (13may18)
git-svn-id: svn://tug.org/texlive/trunk@47705 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx index ca8a79b3227..0630ede3626 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-04-30} +% \date{Released 2018-05-12} % % \maketitle % @@ -73,7 +73,7 @@ % \begin{macrocode} \cs_new_protected:Npn \__kernel_deprecation_error:Nnn #1#2#3 { - \etex_protected:D \tex_outer:D \tex_edef:D #1 + \tex_protected:D \tex_outer:D \tex_edef:D #1 { \exp_not:N \__kernel_msg_expandable_error:nnnnn { kernel } { deprecated-command } @@ -176,6 +176,71 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[deprecated = 2019-12-31]{\etex_beginL:D} +% \begin{macro}{\@@_primitive:NN, \@@_primitive:w} +% We renamed all primitives to \cs[no-index]{tex_\ldots{}:D} so all +% others are deprecated. In \pkg{l3names}, \cs{__kernel_primitives:} +% is defined to contain \cs{__kernel_primitive:NN} \cs{beginL} +% \cs{etex_beginL:D} and so on, one for each deprecated primitive. We +% apply \cs{exp_not:N} to the second argument of +% \cs{__kernel_primitive:NN} because it may be outer (both when doing +% and undoing deprecation actually), then \cs{@@_primitive:NN} uses +% \cs{tex_let:D} to change the meaning of this potentially outer +% token. Then, either turn it into an error or make it equal to the +% primitive~|#1|. To be more precise, |#1| may not be defined, so try +% a \cs[no-index]{tex_\ldots{}:D} command as well. +% \begin{macrocode} +\cs_new_protected:Npn \@@_primitive:NN #1#2 { } +\exp_last_unbraced:NNNNo + \cs_new:Npn \@@_primitive:w #1 { \token_to_str:N _ } { } +\__kernel_deprecation_code:nn + { + \cs_set_protected:Npn \__kernel_primitive:NN #1 + { + \exp_after:wN \@@_primitive:NN + \exp_after:wN #1 + \exp_not:N + } + \cs_set_protected:Npn \@@_primitive:NN #1#2 + { + \tex_let:D #2 \scan_stop: + \exp_args:NNx \__kernel_deprecation_error:Nnn #2 + { + \iow_char:N \\ + \cs_if_exist:NTF #1 + { \cs_to_str:N #1 } + { + tex_ + \exp_last_unbraced:Nf + \@@_primitive:w { \cs_to_str:N #2 } + } + } + { 2019-12-31 } + } + \__kernel_primitives: + } + { + \cs_set_protected:Npn \__kernel_primitive:NN #1 + { + \exp_after:wN \@@_primitive:NN + \exp_after:wN #1 + \exp_not:N + } + \cs_set_protected:Npn \@@_primitive:NN #1#2 + { + \tex_let:D #2 #1 + \cs_if_exist:cT { tex_ \cs_to_str:N #1 :D } + { + \exp_args:NNc \cs_set_eq:NN #2 + { tex_ \cs_to_str:N #1 :D } + } + } + \__kernel_primitives: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</initex|package> % \end{macrocode} |