[latex3-commits] [git/LaTeX3-latex3-latex3] master: remove unnecessary exp_after:wNs (4f2cfec9b)
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/4f2cfec9bda9827a260cc678ed4dfae7ffad88fd
>---------------------------------------------------------------
commit 4f2cfec9bda9827a260cc678ed4dfae7ffad88fd
Author: Jonathan Spratte <jspratte at yahoo.de>
Date: Sun Oct 4 14:04:23 2020 +0200
remove unnecessary exp_after:wNs
>---------------------------------------------------------------
4f2cfec9bda9827a260cc678ed4dfae7ffad88fd
l3kernel/l3tl.dtx | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index c228c54a0..9ba81e6af 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1639,6 +1639,7 @@
% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
% }
% \begin{macro}{\tl_rescan:nn}
+% \begin{macro}{\@@_rescan_aux:}
% \begin{macro}{\@@_set_rescan:NNnn, \@@_set_rescan_multi:nNN}
% \begin{macro}[EXP]{\@@_rescan:NNw}
% In a group, after some initial setup explained below and the user
@@ -1697,9 +1698,11 @@
\cs_new_protected:Npn \tl_rescan:nn #1#2
{
\tl_set_rescan:Nnn \l_@@_internal_a_tl {#1} {#2}
- \exp_after:wN \tl_clear:N \exp_after:wN \l_@@_internal_a_tl
+ \exp_after:wN \@@_rescan_aux:
\l_@@_internal_a_tl
}
+\exp_args:NNo \cs_new_protected:Npn \@@_rescan_aux:
+ { \tl_clear:N \l_@@_internal_a_tl }
\cs_new_protected:Npn \tl_set_rescan:Nnn
{ \@@_set_rescan:NNnn \tl_set:No }
\cs_new_protected:Npn \tl_gset_rescan:Nnn
@@ -1718,7 +1721,7 @@
}
\cs_new_protected:Npn \@@_set_rescan_multi:nNN #1#2#3
{
- \exp_args:No \tex_everyeof:D { \c_@@_rescan_marker_tl }
+ \tex_everyeof:D \exp_after:wN { \c_@@_rescan_marker_tl }
\exp_after:wN \@@_rescan:NNw
\exp_after:wN #2
\exp_after:wN #3
@@ -1741,6 +1744,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_set_rescan:nNN}
% \begin{macro}{\@@_set_rescan_single:nnNN, \@@_set_rescan_single_aux:nnnNN}
@@ -1890,6 +1894,7 @@
% \@@_replace_auxi:NnnNNNnn,
% \@@_replace_auxii:nNNNnn,
% \@@_replace_next:w,
+% \@@_replace_next_aux:w,
% \@@_replace_wrap:w,
% }
% To implement the actual replacement auxiliary
@@ -2044,9 +2049,7 @@
}
#3 #4
{
- \exp_after:wN \@@_replace_next:w
- \exp_after:wN { \exp_after:wN }
- \exp_after:wN { \exp_after:wN }
+ \exp_after:wN \@@_replace_next_aux:w
#4
#1
{
@@ -2057,6 +2060,10 @@
}
\group_align_safe_end:
}
+\cs_new:Npn \@@_replace_next_aux:w
+ {
+ \@@_replace_next:w {} {}
+ }
\cs_new_eq:NN \@@_replace_wrap:w ?
\cs_new_eq:NN \@@_replace_next:w ?
% \end{macrocode}
@@ -2879,9 +2886,9 @@
% While we could optimise the test here, this would leave some tokens
% \enquote{banned} in the input, which we do not have with this definition.
% \begin{macrocode}
-\cs_new:Npn \tl_tail:n #1
+\exp_args:Nno \use:n { \cs_new:Npn \tl_tail:n #1 }
{
- \__kernel_exp_not:w
+ \exp_after:wN \__kernel_exp_not:w
\tl_if_blank:nTF {#1}
{ { } }
{ \exp_after:wN { \use_none:n #1 } }
More information about the latex3-commits
mailing list.