[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Avoid errors due to undefined parameter text (a1ed479f)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Dec 12 02:32:28 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : hook-args
Link : https://github.com/latex3/latex2e/commit/a1ed479f1f4c23ca76790c101a19a2716806eaad
>---------------------------------------------------------------
commit a1ed479f1f4c23ca76790c101a19a2716806eaad
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Sun Dec 11 22:32:28 2022 -0300
Avoid errors due to undefined parameter text
>---------------------------------------------------------------
a1ed479f1f4c23ca76790c101a19a2716806eaad
base/lthooks.dtx | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 6e3d4c42..a6237a68 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2410,7 +2410,7 @@
% used on its own doesn't mark the hook as declared (as
% \cs{hook_new:n} does, so a later \cs{hook_new:n} on that hook will
% not result in an error. This command is internally used by
-% \cs{hook_gput_code:n} when adding code to a generic hook.
+% \cs{hook_gput_code:nnn} when adding code to a generic hook.
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_usable:nn #1 #2
{
@@ -2478,7 +2478,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_code_gset:nn #1 #2
{
- \exp_args:Nv \use_ii_i:nn { c_@@_#1_parameter_tl }
+ \exp_args:Nf \use_ii_i:nn
+ { \cs_if_exist_use:c { c_@@_#1_parameter_tl } }
{ \cs_gset:cpn { @@~#1 } } {#2}
}
\cs_generate_variant:Nn \@@_code_gset:nn { no, nV }
@@ -3624,6 +3625,7 @@
% \g_@@_??_code_prop,
% \@@~??,
% \g_@@_??_reversed_tl,
+% \c_@@_??_parameter_tl,
% }
%
% Initially these variables simply used an empty ``label'' name (not
@@ -3637,11 +3639,11 @@
% lot, the code should be fast, so this is not done with \texttt{c}
% expansion in the code later on.
%
-% \cs{@@\textvisiblespace??} isn't used, but it has to be defined to trick
-% the code into thinking that \texttt{??} is actually a hook.
+% \cs{@@\textvisiblespace??} isn't used, but it has to be defined to
+% trick the code into thinking that \texttt{??} is actually a hook.
% \begin{macrocode}
-\prop_new:c {g_@@_??_code_prop}
-\prop_new:c {@@~??}
+\prop_new:c { g_@@_??_code_prop }
+\prop_new:c { @@~?? }
% \end{macrocode}
%
% Default rules are always given in normal ordering (never in
@@ -3650,7 +3652,12 @@
% \texttt{after} becomes \texttt{before})
% because those rules are applied first and then the order is reversed.
% \begin{macrocode}
-\tl_new:c {g_@@_??_reversed_tl}
+\tl_new:c { g_@@_??_reversed_tl }
+% \end{macrocode}
+%
+% The parameter text for the \enquote{default} hook is empty.
+% \begin{macrocode}
+\tl_const:cn { c_@@_??_parameter_tl } { }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.