summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx102
1 files changed, 51 insertions, 51 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 642c030015c..6c4bb867e3b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.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
%
@@ -679,12 +679,12 @@
%
% \begin{function}[EXP]{\__prg_break_point:Nn}
% \begin{syntax}
-% \cs{__prg_break_point:Nn} \cs[no-index]{\meta{type}_map_break:} \Arg{tokens}
+% \cs{__prg_break_point:Nn} \cs[no-index]{\meta{type}_map_break:} \Arg{code}
% \end{syntax}
% Used to mark the end of a recursion or mapping: the functions
% \cs[no-index]{\meta{type}_map_break:} and \cs[no-index]{\meta{type}_map_break:n} use
% this to break out of the loop. After the loop ends, the
-% \meta{tokens} are inserted into the input stream. This occurs even
+% \meta{code} is inserted into the input stream. This occurs even
% if the break functions are \emph{not} applied:
% \cs{__prg_break_point:Nn} is functionally-equivalent in these cases
% to \cs{use_ii:nn}.
@@ -720,11 +720,11 @@
%
% \begin{function}[EXP]{\__prg_break:, \__prg_break:n}
% \begin{syntax}
-% \cs{__prg_break:n} \Arg{tokens} \ldots{} \cs{__prg_break_point:}
+% \cs{__prg_break:n} \Arg{code} \ldots{} \cs{__prg_break_point:}
% \end{syntax}
% Breaks a recursion which has no \meta{ending code} and which is not
% a user-breakable mapping (see for instance \cs{prop_get:Nn}), and
-% inserts \meta{tokens} in the input stream.
+% inserts the \meta{code} in the input stream.
% \end{function}
%
% \end{documentation}
@@ -811,16 +811,16 @@
% make sure the boolean exists. This is needed because booleans are
% not based on token lists nor on \TeX{} registers.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set_true:N #1
{ \cs_set_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set_false:N #1
{ \cs_set_eq:NN #1 \c_false_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset_true:N #1
{ \cs_gset_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset_false:N #1
{ \cs_gset_eq:NN #1 \c_false_bool }
\cs_generate_variant:Nn \bool_set_true:N { c }
@@ -855,10 +855,10 @@
% argument the meaning \cs{c_true_bool} or \cs{c_false_bool}.
% Again, we include some checking code.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set:Nn #1#2
{ \tex_chardef:D #1 = \bool_if_p:n {#2} }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset:Nn #1#2
{ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} }
\cs_generate_variant:Nn \bool_set:Nn { c }
@@ -887,33 +887,34 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\bool_show:N, \bool_show:c, \bool_show:n}
-% \begin{macro}[aux]{\@@_to_str:n}
+% \begin{macro}{\bool_show:n, \bool_log:n}
+% \begin{macro}{\@@_to_str:n}
% Show the truth value of the boolean, as \texttt{true} or
% \texttt{false}.
% \begin{macrocode}
-\cs_new_protected:Npn \bool_show:N #1
- {
- \__msg_show_variable:NNNnn #1 \bool_if_exist:NTF ? { }
- { > ~ \token_to_str:N #1 = \@@_to_str:n {#1} }
- }
\cs_new_protected:Npn \bool_show:n
- { \__msg_show_wrap:Nn \@@_to_str:n }
+ { \msg_show_eval:Nn \@@_to_str:n }
+\cs_new_protected:Npn \bool_log:n
+ { \msg_log_eval:Nn \@@_to_str:n }
\cs_new:Npn \@@_to_str:n #1
{ \bool_if:nTF {#1} { true } { false } }
-\cs_generate_variant:Nn \bool_show:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\bool_log:N, \bool_log:c, \bool_log:n}
-% Redirect output of \cs{bool_show:N} to the log.
+% \begin{macro}{\bool_show:N, \bool_show:c, \bool_log:N, \bool_log:c, \@@_show:NN}
+% Show the truth value of the boolean, as \texttt{true} or
+% \texttt{false}.
% \begin{macrocode}
-\cs_new_protected:Npn \bool_log:N
- { \__msg_log_next: \bool_show:N }
-\cs_new_protected:Npn \bool_log:n
- { \__msg_log_next: \bool_show:n }
+\cs_new_protected:Npn \bool_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \bool_show:N { c }
+\cs_new_protected:Npn \bool_log:N { \@@_show:NN \tl_log:n }
\cs_generate_variant:Nn \bool_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
+ {
+ \__kernel_check_defined:NT #2
+ { \exp_args:Nx #1 { \token_to_str:N #2 = \@@_to_str:n {#2} } }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1014,7 +1015,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_get_next:NN}
+% \begin{macro}{\@@_get_next:NN}
% The GetNext operation. Its first argument is \cs{use_i:nnnn},
% \cs{use_ii:nnnn}, \cs{use_iii:nnnn}, or \cs{use_iv:nnnn} (we call
% these \enquote{states}). In the first state, this function
@@ -1045,7 +1046,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_!:Nw}
+% \begin{macro}{\@@_!:Nw}
% The Not operation reverses the logic: it discards the |!|~token and
% calls the GetNext operation with the appropriate first argument.
% Namely the first and second states are interchanged, but after
@@ -1060,7 +1061,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_(:Nw}
+% \begin{macro}{\@@_(:Nw}
% The Open operation starts a sub-expression after discarding the open
% parenthesis. This is done by calling GetNext (which eventually
% discards the corresponding closing parenthesis), with a
@@ -1075,7 +1076,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_p:Nw}
+% \begin{macro}{\@@_p:Nw}
% If what follows GetNext is neither |!| nor |(|, evaluate the
% predicate using the primitive \cs{__int_value:w}. The canonical
% \texttt{true} and \texttt{false} values have numerical values $1$
@@ -1086,16 +1087,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_choose:NNN}
-% \begin{macro}[aux]+\@@_)_0:+
-% \begin{macro}[aux]+\@@_)_1:+
-% \begin{macro}[aux]+\@@_)_2:+
-% \begin{macro}[aux]+\@@_&_0:+
-% \begin{macro}[aux]+\@@_&_1:+
-% \begin{macro}[aux]+\@@_&_2:+
-% \begin{macro}[aux]+\@@_|_0:+
-% \begin{macro}[aux]+\@@_|_1:+
-% \begin{macro}[aux]+\@@_|_2:+
+% \begin{macro}{\@@_choose:NNN}
+% \begin{macro}+\@@_)_0:+
+% \begin{macro}+\@@_)_1:+
+% \begin{macro}+\@@_)_2:+
+% \begin{macro}+\@@_&_0:+
+% \begin{macro}+\@@_&_1:+
+% \begin{macro}+\@@_&_2:+
+% \begin{macro}+\@@_|_0:+
+% \begin{macro}+\@@_|_1:+
+% \begin{macro}+\@@_|_2:+
% The arguments are |#1|: a function such as \cs{use_i:nnnn}, |#2|:
% $0$ or $1$ encoding the current truth value, |#3|: the next
% operation, And, Or or Close. We distinguish three cases according
@@ -1149,7 +1150,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\bool_lazy_all:n}
-% \begin{macro}[aux]{\@@_lazy_all:n}
+% \begin{macro}{\@@_lazy_all:n}
% \UnitTested
% Go through the list of expressions, stopping whenever an expression
% is \texttt{false}. If the end is reached without finding any
@@ -1182,7 +1183,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\bool_lazy_any:n}
-% \begin{macro}[aux]{\@@_lazy_any:n}
+% \begin{macro}{\@@_lazy_any:n}
% \UnitTested
% Go through the list of expressions, stopping whenever an expression
% is \texttt{true}. If the end is reached without finding any
@@ -1324,9 +1325,9 @@
%
% \begin{macro}{\prg_replicate:nn}
% \UnitTested
-% \begin{macro}[aux]{\@@_replicate:N, \@@_replicate_first:N}
-% \begin{macro}[aux]{\@@_replicate_}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_replicate:N, \@@_replicate_first:N}
+% \begin{macro}{\@@_replicate_}
+% \begin{macro}
% {
% \@@_replicate_0:n,
% \@@_replicate_1:n,
@@ -1339,7 +1340,7 @@
% \@@_replicate_8:n,
% \@@_replicate_9:n
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_replicate_first_-:n,
% \@@_replicate_first_0:n,
@@ -1384,12 +1385,11 @@
% pool. Also, it is considerably slower than what we use here so the
% few extra csnames are well spent I would say.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \prg_replicate:nn #1
{
\exp:w
\exp_after:wN \@@_replicate_first:N
- \__int_value:w \__int_eval:w #1 \__int_eval_end:
+ \__int_value:w \__int_eval:n {#1}
\cs_end:
}
\cs_new:Npn \@@_replicate:N #1
@@ -1493,7 +1493,7 @@
%
% \subsection{Internal programming functions}
%
-% \begin{macro}[int]{\group_align_safe_begin:, \group_align_safe_end:}
+% \begin{macro}{\group_align_safe_begin:, \group_align_safe_end:}
% \TeX{}'s alignment structures present many problems. As Knuth says
% himself in \emph{\TeX : The Program}: \enquote{It's sort of a miracle
% whenever \tn{halign} or \tn{valign} work, [\ldots]} One problem relates