[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh441: Use current default label as fallback (c54967b9)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Dec 14 12:52:49 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : hotfix/gh441
Link : https://github.com/latex3/latex2e/commit/c54967b9eb12638c5bffcfe51b8d2e1438e5b2a7
>---------------------------------------------------------------
commit c54967b9eb12638c5bffcfe51b8d2e1438e5b2a7
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Dec 14 08:52:49 2020 -0300
Use current default label as fallback
>---------------------------------------------------------------
c54967b9eb12638c5bffcfe51b8d2e1438e5b2a7
base/lthooks.dtx | 5 +++--
base/testfiles-lthooks/lthooks-024.tlg | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 1c8f847b..9e54797d 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2033,8 +2033,9 @@
{
\tl_if_empty:nTF {#1}
{
- \msg_expandable_error:nnn { hooks } { empty-label } {#2}
- #2
+ \msg_expandable_error:nnf { hooks } { empty-label }
+ { \@@_currname_or_default:n {#2} }
+ \@@_currname_or_default:n {#2}
}
{
\str_if_eq:nnTF {#1} { . }
diff --git a/base/testfiles-lthooks/lthooks-024.tlg b/base/testfiles-lthooks/lthooks-024.tlg
index ae480169..4cb8a770 100644
--- a/base/testfiles-lthooks/lthooks-024.tlg
+++ b/base/testfiles-lthooks/lthooks-024.tlg
@@ -43,7 +43,7 @@ and I'll forget about whatever was undefined.
top-level/foo/, /./foo.
! Undefined control sequence.
<argument> \::error
- ! hooks: Empty code label on line .... Using `top-level' ...
+ ! hooks: Empty code label on line .... Using `pkg' instead.
l. ... \testme{pkg}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -52,7 +52,7 @@ spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \::error
- ! hooks: Empty code label on line .... Using `top-level' ...
+ ! hooks: Empty code label on line .... Using `pkg' instead.
l. ... \testme{pkg}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
@@ -61,7 +61,7 @@ spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-> The hook 'foo':
> Code chunks:
-> pkg -> pkg
+> pkg -> top-leveltop-levelpkg
> .. -> ..
> ../ -> ../
> / -> /
@@ -75,7 +75,7 @@ and I'll forget about whatever was undefined.
> pkg/foo/ -> pkg/foo/
> /./foo -> /./foo
> Document-level (top-level) code (executed last):
-> -> top-leveltop-level
+> ---
> Extra code for next invocation:
> ---
> Rules:
More information about the latex3-commits
mailing list.