[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use \@@_tmp:w consistently and remove its definition at the end of l3tl (e4bd56427)
Bruno Le Floch
blflatex at gmail.com
Tue Oct 27 09:28:44 CET 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/e4bd564278c57096a11d119a96925299c86a5727
>---------------------------------------------------------------
commit e4bd564278c57096a11d119a96925299c86a5727
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Tue Oct 27 09:28:44 2020 +0100
Use \@@_tmp:w consistently and remove its definition at the end of l3tl
>---------------------------------------------------------------
e4bd564278c57096a11d119a96925299c86a5727
l3kernel/l3tl.dtx | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index bef53377f..34e53547e 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2756,7 +2756,7 @@
% nothing in one step of expansion), and feeds this to the
% \meta{continuation}.
% \begin{macrocode}
-\cs_set:Npn \@@_tmp:w #1
+\cs_set_protected:Npn \@@_tmp:w #1
{
\cs_new:Npn \@@_trim_spaces:nn ##1
{
@@ -3180,24 +3180,22 @@
% argument~|#1| of \cs{@@_act_loop:w}, we can use this marker to set up a fast
% test for leading spaces.
% \begin{macrocode}
-\group_begin:
- \cs_set:Npn \@@_tmp:n #1
- {
- \cs_new:Npn \@@_act_if_head_is_space:nTF ##1
- {
- \@@_act_if_head_is_space:w
- \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 \s_@@_act_stop #1 ##2 \s_@@_act_stop
- {}
- \cs_new:Npn \@@_act_if_head_is_space_true:w
- \s_@@_act_stop #1 \s_@@_act_stop \use_ii:nn ##1 ##2
- {##1}
- }
- \@@_tmp:n { ~ }
-\group_end:
+\cs_set_protected:Npn \@@_tmp:w #1
+ {
+ \cs_new:Npn \@@_act_if_head_is_space:nTF ##1
+ {
+ \@@_act_if_head_is_space:w
+ \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 \s_@@_act_stop #1 ##2 \s_@@_act_stop
+ {}
+ \cs_new:Npn \@@_act_if_head_is_space_true:w
+ \s_@@_act_stop #1 \s_@@_act_stop \use_ii:nn ##1 ##2
+ {##1}
+ }
+\@@_tmp:w { ~ }
% \end{macrocode}
% In the loop, we check how the token list begins and act
% accordingly. In the \enquote{group} case, we may have
@@ -3625,6 +3623,12 @@
% \end{macrocode}
% \end{variable}
%
+% We finally clean up a temporary control sequence that we have used at
+% various points to set up some definitions.
+% \begin{macrocode}
+\cs_undefine:N \@@_tmp:w
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
More information about the latex3-commits
mailing list.