[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Only define a quark auxiliary when needed (4e53230bc)
Bruno Le Floch
bruno at le-floch.fr
Wed May 6 14:14:51 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : scan-quark
Link : https://github.com/latex3/latex3/commit/4e53230bc4681ef3834c0555ea96b586d8771b61
>---------------------------------------------------------------
commit 4e53230bc4681ef3834c0555ea96b586d8771b61
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Wed May 6 14:14:51 2020 +0200
Only define a quark auxiliary when needed
>---------------------------------------------------------------
4e53230bc4681ef3834c0555ea96b586d8771b61
l3kernel/l3quark.dtx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index b2a7f44e0..284e82c0e 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -826,8 +826,11 @@
% \@@_new_conditional_aux_do:NNnnn,
% \@@_new_conditional_define:NNNNn,
% }
-% Similar to the previous macros, but branching conditionals only require
-% one auxiliary, so we take a shortcut.
+% Similar to the previous macros, but branching conditionals only
+% require one auxiliary, so we take a shortcut. In
+% \cs{@@_new_conditional_define:NNNNn}, |#4| is \cs{use_i:nn} to
+% define the \texttt{n}-type function (which needs an auxiliary) and
+% is \cs{use_ii:nn} to define the \texttt{N}-type function.
% \begin{macrocode}
\cs_new_protected:Npn \@@_new_conditional_aux_do:NNnnn #1 #2 #3 #4
{
@@ -836,7 +839,7 @@
}
\cs_new_protected:Npn \@@_new_conditional_define:NNNNn #1 #2 #3 #4 #5
{
- \cs_gset:Npn #1 ##1 #2 ##2 ? ##3 ?! { ##1 ##2 }
+ #4 { \cs_gset:Npn #1 ##1 #2 ##2 ? ##3 ?! { ##1 ##2 } } { }
\exp_args:Nno \use:n { \prg_new_conditional:Npnn #3 ##1 {#5} }
{
#4 { \@@_if_empty_if:o { #1 {} ##1 {} ?! #2 ??! } }
More information about the latex3-commits
mailing list.