summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3token.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx114
1 files changed, 42 insertions, 72 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 34c03120b63..5c72190f6b8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -7,7 +7,7 @@
% license or (at your option) any later version. The latest version
% of this license is in the file
%
-% http://www.latex-project.org/lppl.txt
+% https://www.latex-project.org/lppl.txt
%
% This file is part of the "l3kernel bundle" (The Work in LPPL)
% and all files in that bundle must be distributed together.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -396,14 +396,6 @@
%
% \section{Generic tokens}
%
-% \begin{function}{\token_new:Nn}
-% \begin{syntax}
-% \cs{token_new:Nn} \meta{token_1} \Arg{token_2}
-% \end{syntax}
-% Defines \meta{token_1} to globally be a snapshot of \meta{token_2}.
-% This is an implicit representation of \meta{token_2}.
-% \end{function}
-%
% \begin{variable}
% {
% \c_group_begin_token,
@@ -1136,17 +1128,12 @@
% \begin{macro}{\char_show_value_catcode:n}
% Simple wrappers around the primitives.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new_protected:Npn \char_set_catcode:nn #1#2
- {
- \tex_catcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_catcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_catcode:n #1
- { \tex_the:D \tex_catcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_catcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_catcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_catcode:n {#1} } }
+ { \exp_args:Nf \tl_show:n { \char_value_catcode:n {#1} } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1276,50 +1263,30 @@
% \begin{macro}{\char_show_value_sfcode:n}
% Pretty repetitive, but necessary!
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new_protected:Npn \char_set_mathcode:nn #1#2
- {
- \tex_mathcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_mathcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_mathcode:n #1
- { \tex_the:D \tex_mathcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_mathcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_mathcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_mathcode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_mathcode:n {#1} } }
\cs_new_protected:Npn \char_set_lccode:nn #1#2
- {
- \tex_lccode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_lccode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_lccode:n #1
- { \tex_the:D \tex_lccode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_lccode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_lccode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_lccode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_lccode:n {#1} } }
\cs_new_protected:Npn \char_set_uccode:nn #1#2
- {
- \tex_uccode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_uccode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_uccode:n #1
- { \tex_the:D \tex_uccode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_uccode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_uccode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_uccode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_uccode:n {#1} } }
\cs_new_protected:Npn \char_set_sfcode:nn #1#2
- {
- \tex_sfcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_sfcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_sfcode:n #1
- { \tex_the:D \tex_sfcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_sfcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_sfcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_sfcode:n {#1} } }
+ { \exp_args:Nf \tl_show:n { \char_value_sfcode:n {#1} } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1388,19 +1355,19 @@
% \end{macro}
%
% \begin{macro}[EXP]{\char_generate:nn}
-% \begin{macro}[EXP, int]{\__char_generate:nn}
-% \begin{macro}[EXP, aux]{\@@_generate_aux:nn}
-% \begin{macro}[EXP, aux]{\@@_generate_aux:nnw}
+% \begin{macro}[EXP]{\__char_generate:nn}
+% \begin{macro}[EXP]{\@@_generate_aux:nn}
+% \begin{macro}[EXP]{\@@_generate_aux:nnw}
% \begin{variable}{\l_@@_tmp_tl}
% \begin{variable}{\c_@@_max_int}
-% \begin{macro}[EXP, aux]{\@@_generate_invalid_catcode:}
+% \begin{macro}[EXP]{\@@_generate_invalid_catcode:}
% The aim here is to generate characters of (broadly) arbitrary category
% code. Where possible, that is done using engine support (\XeTeX{},
% \LuaTeX{}). There are though various issues which are covered below. At
% the interface layer, turn the two arguments into integers up-front so
% this is only done once.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+\__debug_patch_args:nNNpn { { \__int_eval:n {#1} } { \__int_eval:n {#2} } }
\cs_new:Npn \char_generate:nn #1#2
{
\exp:w \exp_after:wN \@@_generate_aux:w
@@ -1622,13 +1589,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\token_new:Nn}
-% Creates a new token.
-% \begin{macrocode}
-\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}
% {
% \c_group_begin_token,
@@ -1859,7 +1819,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\token_if_macro:N}
-% \begin{macro}[aux]{\@@_if_macro_p:w}
+% \begin{macro}{\@@_if_macro_p:w}
% When a token is a macro, \cs{token_to_meaning:N} always outputs
% something like |\long macro:#1->#1| so we could naively check to
% see if the meaning contains |->|. However, this can fail the five
@@ -1945,7 +1905,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_delimit_by_char":w,
% \@@_delimit_by_count:w,
@@ -2084,7 +2044,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\token_if_primitive:N}
-% \begin{macro}[aux]{\@@_if_primitive:NNw,
+% \begin{macro}{\@@_if_primitive:NNw,
% \@@_if_primitive_space:w,
% \@@_if_primitive_nullfont:N,
% \@@_if_primitive_loop:N,
@@ -2243,7 +2203,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_true:w, \@@_true_aux:w, \@@_false:w, \@@_tmp:w}
% Functions used by the branching and space-stripping code.
% \begin{macrocode}
@@ -2267,7 +2227,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_true_remove:w}
+% \begin{macro}{\@@_true_remove:w}
% A function to remove the next token and then regain control.
% \begin{macrocode}
\cs_new_protected:Npn \@@_true_remove:w
@@ -2341,7 +2301,7 @@
% \end{macro}
%
% \begin{macro}{\@@_execute_branches_catcode:, \@@_execute_branches_charcode:}
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_execute_branches_catcode_aux: ,
% \@@_execute_branches_catcode_auxii:N ,
@@ -2432,8 +2392,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_def:nnnn}
-% \begin{macro}[aux]{\@@_def:nnnnn}
+% \begin{macro}{\@@_def:nnnn}
+% \begin{macro}{\@@_def:nnnnn}
% The public functions themselves cannot be defined using
% \cs{prg_new_conditional:Npnn} and so a couple of auxiliary functions
% are used. As a result, everything is done inside a group. As a result
@@ -2543,7 +2503,7 @@
% \begin{macro}{\token_get_prefix_spec:N}
% \begin{macro}{\token_get_arg_spec:N}
% \begin{macro}{\token_get_replacement_spec:N}
-% \begin{macro}[aux]{\@@_get_prefix_arg_replacement:wN}
+% \begin{macro}{\@@_get_prefix_arg_replacement:wN}
% We sometimes want to test if a
% control sequence can be expanded to reveal a hidden
% value. However, we cannot just expand the macro blindly as it may
@@ -2591,6 +2551,16 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Deprecated functions}
+%
+% \begin{macro}[deprecated=2018-12-31]{\token_new:Nn}
+% For removal after 2018-12-31.
+% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \cs_new_eq:NN }
+\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}