[latex3-commits] [git/LaTeX3-latex3-latex3] master: Even more subtle \exp_not:n test (c7163e164)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Jan 23 09:11:26 CET 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/c7163e164e090e84bb1e85633caa3bb836cd9b04
>---------------------------------------------------------------
commit c7163e164e090e84bb1e85633caa3bb836cd9b04
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Jan 23 08:09:31 2020 +0000
Even more subtle \exp_not:n test
>---------------------------------------------------------------
c7163e164e090e84bb1e85633caa3bb836cd9b04
l3kernel/l3text.dtx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index ba9794515..2a2b7dc73 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -538,7 +538,7 @@
% \begin{macro}[EXP]{\@@_expand_replace:N}
% \begin{macro}[EXP]{\@@_expand_replace:n}
% \begin{macro}[EXP]{\@@_expand_cs_expand:N}
-% \begin{macro}[EXP]{\@@_expand_noexpand:n}
+% \begin{macro}[EXP]{\@@_expand_noexpand:nn}
% After precautions against |&| tokens, start a simple loop: that of
% course means that \enquote{text} cannot contain the two recursion
% quarks. The loop here must be \texttt{f}-type expandable; we have
@@ -893,13 +893,14 @@
% Finally, expand any macros which can be: this then loops back around to
% deal with what they produce. The only issue is if the token is
% \cs{exp_not:n}, as that must apply to the following balanced text.
+% There might be an \cs{exp_after:wN} there, so we check for it.
% \begin{macrocode}
\cs_new:Npn \@@_expand_cs_expand:N #1
{
\@@_if_expandable:NTF #1
{
- \str_if_eq:nnTF {#1} { \exp_not:n }
- { \@@_expand_noexpand:n }
+ \token_if_eq_meaning:NNTF #1 \exp_not:n
+ { \@@_expand_noexpand:w }
{ \exp_after:wN \@@_expand_loop:w #1 }
}
{
@@ -907,9 +908,11 @@
\@@_expand_loop:w
}
}
-\cs_new:Npn \@@_expand_noexpand:n #1
+\cs_new:Npn \@@_expand_noexpand:w #1#
+ { \@@_expand_noexpand:nn {#1} }
+\cs_new:Npn \@@_expand_noexpand:nn #1#2
{
- \@@_expand_store:n {#1}
+ #1 \@@_expand_store:n #1 {#2}
\@@_expand_loop:w
}
% \end{macrocode}
More information about the latex3-commits
mailing list