[latex3-commits] [git/LaTeX3-latex3-latex2e] gh1052: Initialise structure when adding 'next' code (d83a8cf0)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Apr 19 05:41:06 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : gh1052
Link       : https://github.com/latex3/latex2e/commit/d83a8cf011eccf5444ae8050b44331dee0938aca

>---------------------------------------------------------------

commit d83a8cf011eccf5444ae8050b44331dee0938aca
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Wed Apr 19 00:41:06 2023 -0300

    Initialise structure when adding 'next' code
    
    Fixes #1052


>---------------------------------------------------------------

d83a8cf011eccf5444ae8050b44331dee0938aca
 base/lthooks.dtx                       | 1 +
 base/testfiles-lthooks/github-1052.tlg | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 8f2a501b..203fe775 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -6316,6 +6316,7 @@
 %<latexrelease>                 {Hooks~with~args}
 \cs_new_protected:Npn \@@_gput_next_do:nn #1
   {
+    \@@_init_structure:n {#1}
     \@@_chk_args_allowed:nn {#1} { AddToHookNext }
     \@@_cs_if_empty:cT { @@~#1 }
       { \@@_update_hook_code:n {#1} }
diff --git a/base/testfiles-lthooks/github-1052.tlg b/base/testfiles-lthooks/github-1052.tlg
index 265b8dad..510e522d 100644
--- a/base/testfiles-lthooks/github-1052.tlg
+++ b/base/testfiles-lthooks/github-1052.tlg
@@ -46,6 +46,7 @@ env/foo/after
 -> The hook 'envfooafter':
 > The hook is not declared.
 > Code chunks:
+>     ---
 > Document-level (top-level) code:
 >     ---
 > Extra code for next invocation:
@@ -56,6 +57,7 @@ env/foo/after
 >     Not set because the hook is undeclared.
 <recently read> }
 l. ...\hook_show:n { envfooafter }
+envfooafter
 -> The generic hook 'env/foo/begin':
 > Code chunks:
 >     ---





More information about the latex3-commits mailing list.