[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Only normalise if the cs is defined (f8042dd4)
PhelypeOleinik
phelype.oleinik at latex-project.org
Fri Mar 31 04:21:55 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : hook-args
Link : https://github.com/latex3/latex2e/commit/f8042dd4f0706f10b8aa6101a907aab1f8695e0b
>---------------------------------------------------------------
commit f8042dd4f0706f10b8aa6101a907aab1f8695e0b
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Thu Mar 30 23:21:55 2023 -0300
Only normalise if the cs is defined
>---------------------------------------------------------------
f8042dd4f0706f10b8aa6101a907aab1f8695e0b
base/lthooks.dtx | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index a7fe4f5c..b2d719f2 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2693,6 +2693,7 @@
{
\tl_new:c { g_@@_#1_declared_tl }
\@@_make_usable:nn {#1} {#2}
+ \@@_update_hook_code:n {#1}
}
}
%<latexrelease>\EndIncludeInRelease
@@ -4389,17 +4390,20 @@
%<latexrelease> {Hooks~with~args}
\cs_new_protected:Npn \@@_normalise_cs_args:nn #1 #2
{
- \@@_code_gset_auxi:veen
- { c_@@_#2_parameter_tl }
+ \cs_if_exist:cT { @@#1~#2 }
{
- \exp_args:NNo \exp_args:No \@@_double_hashes:n
+ \@@_code_gset_auxi:veen
+ { c_@@_#2_parameter_tl }
{
- \cs:w @@#1~#2 \exp_last_unbraced:Ne \cs_end:
- { \@@_braced_cs_parameter:n { @@#1~#2 } }
+ \exp_args:NNo \exp_args:No \@@_double_hashes:n
+ {
+ \cs:w @@#1~#2 \exp_last_unbraced:Ne \cs_end:
+ { \@@_braced_cs_parameter:n { @@#1~#2 } }
+ }
}
+ { }
+ { @@#1~#2 }
}
- { }
- { @@#1~#2 }
}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
More information about the latex3-commits
mailing list.