[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Avoid adding spurious entries to the default name stack (8e23fabb)

PhelypeOleinik phelype.oleinik at latex-project.org
Tue Mar 16 05:11:15 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/8e23fabbb7a323b5759907841b50aea33ca0e24e

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

commit 8e23fabbb7a323b5759907841b50aea33ca0e24e
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Mar 16 01:11:15 2021 -0300

    Avoid adding spurious entries to the default name stack


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

8e23fabbb7a323b5759907841b50aea33ca0e24e
 base/lthooks.dtx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 45ae25c3..216d1440 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -4218,7 +4218,8 @@
 %   \pkg{latexrelease} may be loaded inside another package (notably
 %   \pkg{platexrelease}), so we'll first push the |top-level| entry:
 %    \begin{macrocode}
-%<latexrelease>\seq_gput_right:Nn \g_@@_name_stack_seq { top-level }
+%<latexrelease>\seq_if_empty:NT \g_@@_name_stack_seq
+%<latexrelease>  { \seq_gput_right:Nn \g_@@_name_stack_seq { top-level } }
 %    \end{macrocode}
 %   then we dissect the \cs{@currnamestack}, adding \cs{@currname} to
 %   the stack:
@@ -4237,6 +4238,7 @@
 %   and finally set the default label to be the \cs{@currname}:
 %    \begin{macrocode}
 %<latexrelease>\tl_gset:Nx \g_@@_hook_curr_name_tl { \@currname }
+%<latexrelease>\seq_gpop_right:NN \g_@@_name_stack_seq \l_@@_tmpa_tl
 %    \end{macrocode}
 %
 %   Two commands keep track of the stack: when a file is input,





More information about the latex3-commits mailing list.