[latex3-commits] [git/LaTeX3-latex3-latex3] master: change q__tl_act_stop to a scan mark (6c28279da)
Bruno Le Floch
blflatex at gmail.com
Tue Oct 27 09:11:58 CET 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/6c28279daa440441fb9d090eb8d7ffb3333d022a
>---------------------------------------------------------------
commit 6c28279daa440441fb9d090eb8d7ffb3333d022a
Author: Jonathan Spratte <jspratte at yahoo.de>
Date: Sat Oct 3 21:30:12 2020 +0200
change q__tl_act_stop to a scan mark
>---------------------------------------------------------------
6c28279daa440441fb9d090eb8d7ffb3333d022a
l3kernel/l3tl.dtx | 42 +++++++++++++++++++--------------------
l3kernel/testfiles/m3quark001.tlg | 1 +
2 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 235b56944..c228c54a0 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -3143,14 +3143,14 @@
%
% \subsection{Token by token changes}
%
-% \begin{variable}{\q_@@_act_stop}
+% \begin{variable}{\s_@@_act_stop}
% The \cs[no-index]{@@_act_\ldots{}} functions may be applied to any token list.
% Hence, we use a private quark, to allow any token, even quarks,
% in the token list.
-% Only \cs{q_@@_act_stop} may not appear in the token lists manipulated by
+% Only \cs{s_@@_act_stop} may not appear in the token lists manipulated by
% \cs{@@_act:NNNnn} functions.
% \begin{macrocode}
-\quark_new:N \q_@@_act_stop
+\scan_new:N \s_@@_act_stop
% \end{macrocode}
% \end{variable}
%
@@ -3172,7 +3172,7 @@
% be proceeded by \cs{exp:w} and ends by producing \cs{exp_end:}
% once the result has been obtained. This way no internal token of it can be
% accidentally end up in the input stream.
-% Because \cs{q_@@_act_stop} can't appear without braces around it in the
+% Because \cs{s_@@_act_stop} can't appear without braces around it in the
% argument~|#1| of \cs{@@_act_loop:w}, we can use this marker to set up a fast
% test for leading spaces.
% \begin{macrocode}
@@ -3182,14 +3182,14 @@
\cs_new:Npn \@@_act_if_head_is_space:nTF ##1
{
\@@_act_if_head_is_space:w
- \q_@@_act_stop ##1 \q_@@_act_stop \@@_act_if_head_is_space_true:w
- \q_@@_act_stop #1 \q_@@_act_stop \use_ii:nn
+ \s_@@_act_stop ##1 \s_@@_act_stop \@@_act_if_head_is_space_true:w
+ \s_@@_act_stop #1 \s_@@_act_stop \use_ii:nn
}
\cs_new:Npn \@@_act_if_head_is_space:w
- ##1 \q_@@_act_stop #1 ##2 \q_@@_act_stop
+ ##1 \s_@@_act_stop #1 ##2 \s_@@_act_stop
{}
\cs_new:Npn \@@_act_if_head_is_space_true:w
- \q_@@_act_stop #1 \q_@@_act_stop \use_ii:nn ##1 ##2
+ \s_@@_act_stop #1 \s_@@_act_stop \use_ii:nn ##1 ##2
{##1}
}
\@@_tmp:n { ~ }
@@ -3197,7 +3197,7 @@
% \end{macrocode}
% In the loop, we check how the token list begins and act
% accordingly. In the \enquote{group} case, we may have
-% reached \cs{q_@@_act_stop}, the end of the list. Then
+% reached \cs{s_@@_act_stop}, the end of the list. Then
% leave \cs{exp_end:} and the result in the input stream,
% to terminate the expansion of \cs{exp:w}.
% Otherwise, apply the relevant function to the
@@ -3218,45 +3218,45 @@
{ \exp_not:N \@@_act_normal:NwnNNN }
}
}
- \exp_args:Nno \use:n { \cs_new:Npn \@@_act_loop:w #1 \q_@@_act_stop }
+ \exp_args:Nno \use:n { \cs_new:Npn \@@_act_loop:w #1 \s_@@_act_stop }
{
\@@_tmp:
- #1 \q_@@_act_stop
+ #1 \s_@@_act_stop
}
\group_end:
-\cs_new:Npn \@@_act_normal:NwnNNN #1 #2 \q_@@_act_stop #3#4
+\cs_new:Npn \@@_act_normal:NwnNNN #1 #2 \s_@@_act_stop #3#4
{
#4 {#3} #1
- \@@_act_loop:w #2 \q_@@_act_stop
+ \@@_act_loop:w #2 \s_@@_act_stop
{#3} #4
}
-\cs_new:Npn \@@_use_none_delimit_by_q_act_stop:w #1 \q_@@_act_stop { }
+\cs_new:Npn \@@_use_none_delimit_by_s_act_stop:w #1 \s_@@_act_stop { }
\cs_new:Npn \@@_act_end:wn #1 \@@_act_result:n #2
{ \group_align_safe_end: \exp_end: #2 }
-\cs_new:Npn \@@_act_group:nwnNNN #1 #2 \q_@@_act_stop #3#4#5#6
+\cs_new:Npn \@@_act_group:nwnNNN #1 #2 \s_@@_act_stop #3#4#5#6
{
- \@@_use_none_delimit_by_q_act_stop:w #1 \@@_act_end:wn \q_@@_act_stop
+ \@@_use_none_delimit_by_s_act_stop:w #1 \@@_act_end:wn \s_@@_act_stop
#6 {#3} {#1}
- \@@_act_loop:w #2 \q_@@_act_stop
+ \@@_act_loop:w #2 \s_@@_act_stop
{#3} #4 #5 #6
}
\exp_last_unbraced:NNo
- \cs_new:Npn \@@_act_space:wwnNNN \c_space_tl #1 \q_@@_act_stop #2#3#4
+ \cs_new:Npn \@@_act_space:wwnNNN \c_space_tl #1 \s_@@_act_stop #2#3#4
{
#4 {#2}
- \@@_act_loop:w #1 \q_@@_act_stop
+ \@@_act_loop:w #1 \s_@@_act_stop
{#2} #3 #4
}
% \end{macrocode}
% \cs{@@_act:NNNnn} loops over tokens, groups, and spaces in |#5|.
-% |{\q_@@_act_stop}| serves as the end of token list marker, the |?| after it
+% |{\s_@@_act_stop}| serves as the end of token list marker, the |?| after it
% avoids losing outer braces. The result is stored as an argument for the
% dummy function \cs{@@_act_result:n}.
% \begin{macrocode}
\exp_args:Nno \use:n { \cs_new:Npn \@@_act:NNNnn #1#2#3#4#5 }
{
\exp_after:wN \group_align_safe_begin:
- \@@_act_loop:w #5 {\q_@@_act_stop} ? \q_@@_act_stop
+ \@@_act_loop:w #5 {\s_@@_act_stop} ? \s_@@_act_stop
{#4} #1 #3 #2
\@@_act_result:n { }
}
diff --git a/l3kernel/testfiles/m3quark001.tlg b/l3kernel/testfiles/m3quark001.tlg
index cf4a74fe2..62fd89989 100644
--- a/l3kernel/testfiles/m3quark001.tlg
+++ b/l3kernel/testfiles/m3quark001.tlg
@@ -82,6 +82,7 @@ LaTeX has been asked to create a new scan mark '\s__foo' but this name has
already been used for a scan mark.
\s_stop
\s__quark
+\s__tl_act_stop
\s__tl_nil
\s__tl_mark
\s__tl_stop
More information about the latex3-commits
mailing list.