[latex3-commits] [git/LaTeX3-latex3-latex3] master: tweak tl_if_head_is_N_type:n (aeb7ffc08)
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/aeb7ffc0849d5b4bc30b5efac44e84608368e834
>---------------------------------------------------------------
commit aeb7ffc0849d5b4bc30b5efac44e84608368e834
Author: Jonathan Spratte <jspratte at yahoo.de>
Date: Fri Sep 18 19:19:12 2020 +0200
tweak tl_if_head_is_N_type:n
>---------------------------------------------------------------
aeb7ffc0849d5b4bc30b5efac44e84608368e834
l3kernel/l3tl.dtx | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 7af493730..e72152332 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -3183,9 +3183,9 @@
% (begin-group token), the lines involving \cs{token_to_str:N} produce a
% single closing brace. The category code test is thus true exactly
% in the fourth case, which is what we want. One cannot optimize by
-% moving one of the |\scan_stop:| to the beginning: if |#1| contains primitive
-% conditionals, all of its occurrences must be dealt with before the
-% \cs{if_catcode:w} tries to skip the \texttt{true} branch of the
+% moving one of the \cs{scan_stop:} to the beginning: if |#1| contains
+% primitive conditionals, all of its occurrences must be dealt with before
+% the \cs{if:w} tries to skip the \texttt{true} branch of the
% conditional.
% \begin{macrocode}
\prg_new_conditional:Npnn \tl_if_head_is_N_type:n #1 { p , T , F , TF }
@@ -3202,18 +3202,12 @@
\cs_new:Npn \@@_if_head_is_N_type_auxi:w #1 ~
{
\tl_if_empty:oTF { #1 }
- { \exp_after:wN \@@_if_head_is_N_type_auxii:nn }
- { \exp_after:wN \@@_if_head_is_N_type_auxiii:n }
+ { f \exp_after:wN \use_none:nn }
+ { \exp_after:wN \@@_if_head_is_N_type_auxii:n }
\exp_after:wN { \if_false: } \fi:
}
-\cs_new:Npn \@@_if_head_is_N_type_auxii:nn #1 #2
- {
- f
- }
-\cs_new:Npn \@@_if_head_is_N_type_auxiii:n #1
- {
- \exp_after:wN \use_none:n \exp_after:wN
- }
+\cs_new:Npn \@@_if_head_is_N_type_auxii:n #1
+ { \exp_after:wN \use_none:n \exp_after:wN }
% \end{macrocode}
% \end{macro}
% \end{macro}
More information about the latex3-commits
mailing list.