[latex3-commits] [git/LaTeX3-latex3-latex2e] misused-replacing-args: \@@_replacing_args_false: in \@@_include_legacy_code_chunk:n (a5b1e05a)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Apr 17 02:29:25 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : misused-replacing-args
Link : https://github.com/latex3/latex2e/commit/a5b1e05ada589ce03c6eebc191f3fa56da09531e
>---------------------------------------------------------------
commit a5b1e05ada589ce03c6eebc191f3fa56da09531e
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Sun Apr 16 21:29:25 2023 -0300
\@@_replacing_args_false: in \@@_include_legacy_code_chunk:n
>---------------------------------------------------------------
a5b1e05ada589ce03c6eebc191f3fa56da09531e
base/lthooks.dtx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 83ddd01e..6eff3056 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -3027,18 +3027,24 @@
% needs to be done.
% \begin{macrocode}
\tl_if_exist:cT { @#1hook }
+ {
% \end{macrocode}
% Of course if the legacy hook exists but is empty, there is no need
% to add anything under \texttt{legacy} the legacy label.
% \begin{macrocode}
- {
\tl_if_empty:cF { @#1hook }
{
+% \end{macrocode}
+% Here we set \cs{@@_replacing_args_false:} because no legacy code
+% will reference hook arguments.
+% \begin{macrocode}
+ \@@_replacing_args_false:
\use:e
{
\@@_hook_gput_code_do:nnn {#1} { legacy }
{ \exp_not:v { @#1hook } }
}
+ \@@_replacing_args_reset:
% \end{macrocode}
% Once added to the hook, we need to clear it otherwise it might
% get added again later if the hook data gets updated.
More information about the latex3-commits
mailing list.