summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3basics.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3basics.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx85
1 files changed, 47 insertions, 38 deletions
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index 5784ade6f5..22b7a75d15 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-05-05}
+% \date{Released 2020-05-11}
%
% \maketitle
%
@@ -1368,6 +1368,7 @@
\tex_let:D \if_charcode:w \tex_if:D
\tex_let:D \if_catcode:w \tex_ifcat:D
\tex_let:D \if_meaning:w \tex_ifx:D
+\tex_let:D \if_bool:N \tex_ifodd:D
% \end{macrocode}
% \end{macro}
%
@@ -1693,7 +1694,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}
+% \begin{macro}[EXP]
% {
% \use_i_delimit_by_q_nil:nw ,
% \use_i_delimit_by_q_stop:nw ,
@@ -1846,6 +1847,14 @@
% two arguments are absorbed then the code would work.
% \end{macro}
%
+% \begin{macro}[EXP]{\@@_use_none_delimit_by_q_recursion_stop:w}
+% Private version of \cs{use_none_delimit_by_q_recursion_stop:w}.
+% \begin{macrocode}
+\cs_set:Npn \@@_use_none_delimit_by_q_recursion_stop:w
+ #1 \q_@@_recursion_stop { }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}
% {
% \prg_set_conditional:Npnn ,
@@ -1981,17 +1990,17 @@
\exp_not:N \@@_generate_conditional:NNnnnnNw
\exp_not:n { #4 #5 {#1} {#2} {#6} }
\@@_generate_conditional_test:w
- #8 \q_mark
+ #8 \s_@@_mark
\@@_generate_conditional_fast:nw
- \prg_return_true: \else: \prg_return_false: \fi: \q_mark
+ \prg_return_true: \else: \prg_return_false: \fi: \s_@@_mark
\use_none:n
\exp_not:n { {#8} \use_i_ii:nnn }
\tl_to_str:n {#7}
- \exp_not:n { , \q_recursion_tail , \q_recursion_stop }
+ \exp_not:n { , \q_@@_recursion_tail , \q_@@_recursion_stop }
}
}
\cs_set:Npn \@@_generate_conditional_test:w
- #1 \prg_return_true: \else: \prg_return_false: \fi: \q_mark #2
+ #1 \prg_return_true: \else: \prg_return_false: \fi: \s_@@_mark #2
{ #2 {#1} }
\cs_set:Npn \@@_generate_conditional_fast:nw #1#2 \exp_not:n #3
{ \exp_not:n { {#1} \use_i:nn } }
@@ -2006,8 +2015,8 @@
% \begin{macrocode}
\cs_set_protected:Npn \@@_generate_conditional:NNnnnnNw #1#2#3#4#5#6#7#8 ,
{
- \if_meaning:w \q_recursion_tail #8
- \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \if_meaning:w \q_@@_recursion_tail #8
+ \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
\fi:
\use:c { @@_generate_ #8 _form:wNNnnnnN }
\tl_if_empty:nF {#8}
@@ -2017,7 +2026,7 @@
{#8} { \token_to_str:c { #3 : #4 } }
}
\use_none:nnnnnnnn
- \q_stop
+ \s_@@_stop
#1 #2 {#3} {#4} {#5} {#6} #7
\@@_generate_conditional:NNnnnnNw #1 #2 {#3} {#4} {#5} {#6} #7
}
@@ -2052,7 +2061,7 @@
% nesting of conditionals.
% \begin{macrocode}
\cs_set_protected:Npn \@@_generate_p_form:wNNnnnnN
- #1 \q_stop #2#3#4#5#6#7#8
+ #1 \s_@@_stop #2#3#4#5#6#7#8
{
\if_meaning:w e #3
\exp_after:wN \use_i:nn
@@ -2071,7 +2080,7 @@
}
}
\cs_set_protected:Npn \@@_generate_T_form:wNNnnnnN
- #1 \q_stop #2#3#4#5#6#7#8
+ #1 \s_@@_stop #2#3#4#5#6#7#8
{
#8
{ \exp_args:Nc #2 { #4 : #5 T } #6 }
@@ -2079,7 +2088,7 @@
{ #7 \exp_after:wN \use_ii:nn \fi: \use_none:n }
}
\cs_set_protected:Npn \@@_generate_F_form:wNNnnnnN
- #1 \q_stop #2#3#4#5#6#7#8
+ #1 \s_@@_stop #2#3#4#5#6#7#8
{
#8
{ \exp_args:Nc #2 { #4 : #5 F } #6 }
@@ -2087,7 +2096,7 @@
{ #7 \exp_after:wN \use_none:nn \fi: \use:n }
}
\cs_set_protected:Npn \@@_generate_TF_form:wNNnnnnN
- #1 \q_stop #2#3#4#5#6#7#8
+ #1 \s_@@_stop #2#3#4#5#6#7#8
{
#8
{ \exp_args:Nc #2 { #4 : #5 TF } #6 }
@@ -2104,8 +2113,8 @@
% The setting-equal functions. Split both functions and feed
% \Arg{name_1} \Arg{signature_1} \meta{boolean_1}
% \Arg{name_2} \Arg{signature_2} \meta{boolean_2}
-% \meta{copying~function} \meta{conditions} |,| \cs{q_recursion_tail}
-% |,| \cs{q_recursion_stop}
+% \meta{copying~function} \meta{conditions} |,| \cs{q_@@_recursion_tail}
+% |,| \cs{q_@@_recursion_stop}
% to a first auxiliary.
% \begin{macrocode}
\cs_set_protected:Npn \prg_set_eq_conditional:NNn
@@ -2121,7 +2130,7 @@
\cs_split_function:N #3
\exp_not:N #1
\tl_to_str:n {#4}
- \exp_not:n { , \q_recursion_tail , \q_recursion_stop }
+ \exp_not:n { , \q_@@_recursion_tail , \q_@@_recursion_stop }
}
}
% \end{macrocode}
@@ -2156,19 +2165,19 @@
\if_meaning:w \c_false_bool #3
\__kernel_msg_error:nnx { kernel } { missing-colon }
{ \token_to_str:c {#1} }
- \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
\fi:
\if_meaning:w \c_false_bool #6
\__kernel_msg_error:nnx { kernel } { missing-colon }
{ \token_to_str:c {#4} }
- \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
\fi:
\@@_set_eq_conditional_loop:nnnnNw {#1} {#2} {#4} {#5}
}
\cs_set_protected:Npn \@@_set_eq_conditional_loop:nnnnNw #1#2#3#4#5#6 ,
{
- \if_meaning:w \q_recursion_tail #6
- \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \if_meaning:w \q_@@_recursion_tail #6
+ \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w
\fi:
\use:c { @@_set_eq_conditional_ #6 _form:wNnnnn }
\tl_if_empty:nF {#6}
@@ -2178,17 +2187,17 @@
{#6} { \token_to_str:c { #1 : #2 } }
}
\use_none:nnnnnn
- \q_stop
+ \s_@@_stop
#5 {#1} {#2} {#3} {#4}
\@@_set_eq_conditional_loop:nnnnNw {#1} {#2} {#3} {#4} #5
}
-\cs_set:Npn \@@_set_eq_conditional_p_form:wNnnnn #1 \q_stop #2#3#4#5#6
+\cs_set:Npn \@@_set_eq_conditional_p_form:wNnnnn #1 \s_@@_stop #2#3#4#5#6
{ #2 { #3 _p : #4 } { #5 _p : #6 } }
-\cs_set:Npn \@@_set_eq_conditional_TF_form:wNnnnn #1 \q_stop #2#3#4#5#6
+\cs_set:Npn \@@_set_eq_conditional_TF_form:wNnnnn #1 \s_@@_stop #2#3#4#5#6
{ #2 { #3 : #4 TF } { #5 : #6 TF } }
-\cs_set:Npn \@@_set_eq_conditional_T_form:wNnnnn #1 \q_stop #2#3#4#5#6
+\cs_set:Npn \@@_set_eq_conditional_T_form:wNnnnn #1 \s_@@_stop #2#3#4#5#6
{ #2 { #3 : #4 T } { #5 : #6 T } }
-\cs_set:Npn \@@_set_eq_conditional_F_form:wNnnnn #1 \q_stop #2#3#4#5#6
+\cs_set:Npn \@@_set_eq_conditional_F_form:wNnnnn #1 \s_@@_stop #2#3#4#5#6
{ #2 { #3 : #4 F } { #5 : #6 F } }
% \end{macrocode}
% \end{macro}
@@ -2335,12 +2344,12 @@
% First ensure that we actually get a properly evaluated string by
% expanding \cs{cs_to_str:N} twice. If the function contained a
% colon, the auxiliary takes as |#1| the function name, delimited by
-% the first colon, then the signature |#2|, delimited by \cs{q_mark},
-% then \cs{c_true_bool} as |#3|, and |#4| cleans up until \cs{q_stop}.
-% Otherwise, the |#1| contains the function name and \cs{q_mark}
+% the first colon, then the signature |#2|, delimited by \cs{s_@@_mark},
+% then \cs{c_true_bool} as |#3|, and |#4| cleans up until \cs{s_@@_stop}.
+% Otherwise, the |#1| contains the function name and \cs{s_@@_mark}
% \cs{c_true_bool}, |#2| is empty, |#3| is \cs{c_false_bool}, and |#4|
% cleans up. The second
-% auxiliary trims the trailing \cs{q_mark} from the function name if
+% auxiliary trims the trailing \cs{s_@@_mark} from the function name if
% present (that is, if the original function had no colon).
% \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:w #1
@@ -2349,13 +2358,13 @@
{
\exp_after:wN \exp_after:wN \exp_after:wN
\@@_split_function_auxi:w
- \cs_to_str:N ##1 \q_mark \c_true_bool
- #1 \q_mark \c_false_bool \q_stop
+ \cs_to_str:N ##1 \s_@@_mark \c_true_bool
+ #1 \s_@@_mark \c_false_bool \s_@@_stop
}
\cs_set:Npn \@@_split_function_auxi:w
- ##1 #1 ##2 \q_mark ##3##4 \q_stop
- { \@@_split_function_auxii:w ##1 \q_mark \q_stop {##2} ##3 }
- \cs_set:Npn \@@_split_function_auxii:w ##1 \q_mark ##2 \q_stop
+ ##1 #1 ##2 \s_@@_mark ##3##4 \s_@@_stop
+ { \@@_split_function_auxii:w ##1 \s_@@_mark \s_@@_stop {##2} ##3 }
+ \cs_set:Npn \@@_split_function_auxii:w ##1 \s_@@_mark ##2 \s_@@_stop
{ {##1} }
}
\exp_after:wN \@@_tmp:w \token_to_str:N :
@@ -3158,7 +3167,7 @@
\use:x
{
\exp_not:n { \cs_new:Npn \@@_prefix_arg_replacement:wN #1 }
- \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \q_stop #4 }
+ \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \s_@@_stop #4 }
}
{ #4 {#1} {#2} {#3} }
\cs_new:Npn \cs_prefix_spec:N #1
@@ -3166,7 +3175,7 @@
\token_if_macro:NTF #1
{
\exp_after:wN \@@_prefix_arg_replacement:wN
- \token_to_meaning:N #1 \q_stop \use_i:nnn
+ \token_to_meaning:N #1 \s_@@_stop \use_i:nnn
}
{ \scan_stop: }
}
@@ -3175,7 +3184,7 @@
\token_if_macro:NTF #1
{
\exp_after:wN \@@_prefix_arg_replacement:wN
- \token_to_meaning:N #1 \q_stop \use_ii:nnn
+ \token_to_meaning:N #1 \s_@@_stop \use_ii:nnn
}
{ \scan_stop: }
}
@@ -3184,7 +3193,7 @@
\token_if_macro:NTF #1
{
\exp_after:wN \@@_prefix_arg_replacement:wN
- \token_to_meaning:N #1 \q_stop \use_iii:nnn
+ \token_to_meaning:N #1 \s_@@_stop \use_iii:nnn
}
{ \scan_stop: }
}