[latex3-commits] [git/LaTeX3-latex3-latex2e] kernel-msgs: further error normalization (925e88d4)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed May 26 23:32:30 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : kernel-msgs
Link       : https://github.com/latex3/latex2e/commit/925e88d40e2036ceb2ccb3ff1f6200c5750826d4

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

commit 925e88d40e2036ceb2ccb3ff1f6200c5750826d4
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed May 26 23:32:30 2021 +0200

    further error normalization


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

925e88d40e2036ceb2ccb3ff1f6200c5750826d4
 base/ltcmdhooks.dtx                       | 6 +++---
 base/lthooks.dtx                          | 2 +-
 base/testfiles-lthooks/ltcmdhooks-011.tlg | 6 ++----
 base/testfiles-lthooks/lthooks-028.tlg    | 4 ++--
 base/testfiles-lthooks/lthooks-errors.tlg | 2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/base/ltcmdhooks.dtx b/base/ltcmdhooks.dtx
index e73a1bd2..40cd55e5 100644
--- a/base/ltcmdhooks.dtx
+++ b/base/ltcmdhooks.dtx
@@ -1041,11 +1041,11 @@
 %    \begin{macrocode}
 \msg_new:nnnn { hooks } { wrong-cmd-hook }
   {
-    Command~hook~`cmd/#1/#2'~invalid.\\
-    The~hook~should~be~`cmd/#1/before'~or~`cmd/#1/after'.
+    Generic~hook~`cmd/#1/#2'~is~invalid.
+%    The~hook~should~be~`cmd/#1/before'~or~`cmd/#1/after'.
   }
   {
-    You~tried~to~add~a~hook~to~command~\iow_char:N \\#1,~but~`#2'~
+    You~tried~to~add~a~generic~hook~to~command~\iow_char:N \\#1,~but~`#2'~
     is~an~invalid~component.~Only~`before'~or~`after'~are~allowed.
   }
 \msg_new:nnnn { hooks } { cant-patch }
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 6156b2b1..20e172a5 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -4617,7 +4617,7 @@
 %    \begin{macrocode}
 \msg_new:nnnn { hooks } { misused-top-level }
   {
-    Illegal~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
+    Illegal~use~of~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
     'top-level'~is~reserved~for~the~user's~document.
   }
   {
diff --git a/base/testfiles-lthooks/ltcmdhooks-011.tlg b/base/testfiles-lthooks/ltcmdhooks-011.tlg
index dff37991..735aaaad 100644
--- a/base/testfiles-lthooks/ltcmdhooks-011.tlg
+++ b/base/testfiles-lthooks/ltcmdhooks-011.tlg
@@ -1,12 +1,10 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-! LaTeX hooks Error: Command hook `cmd/textbf/middle' invalid.
-(hooks)              The hook should be `cmd/textbf/before' or
-(hooks)              `cmd/textbf/after'.
+! LaTeX hooks Error: Generic hook `cmd/textbf/middle' is invalid.
 For immediate help type H <return>.
  ...                                              
 l. ...\AddToHook{cmd/textbf/middle}{error}
-You tried to add a hook to command \textbf, but `middle' is an invalid
+You tried to add a generic hook to command \textbf, but `middle' is an invalid
 component. Only `before' or `after' are allowed.
 ! LaTeX hooks Error: Generic hooks cannot be added to '\undefined'.
 For immediate help type H <return>.
diff --git a/base/testfiles-lthooks/lthooks-028.tlg b/base/testfiles-lthooks/lthooks-028.tlg
index d776c7d3..ce6b38f9 100644
--- a/base/testfiles-lthooks/lthooks-028.tlg
+++ b/base/testfiles-lthooks/lthooks-028.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 (lthooks-028-pkg.sty
-! LaTeX hooks Error: Illegal \AddToHook{begindocument}[top-level]{...}.
+! LaTeX hooks Error: Illegal use of \AddToHook{begindocument}[top-level]{..}.
 (hooks)              'top-level' is reserved for the user's document.
 For immediate help type H <return>.
  ...                                              
@@ -10,7 +10,7 @@ The 'top-level' label is meant for user code only, and should only be used
 (sparingly) in the main document. Use the default label 'lthooks-028-pkg' for
 this package, or another suitable label.
 )
-! LaTeX hooks Error: Illegal \AddToHook{begindocument}[top-level]{...}.
+! LaTeX hooks Error: Illegal use of \AddToHook{begindocument}[top-level]{..}.
 (hooks)              'top-level' is reserved for the user's document.
 For immediate help type H <return>.
  ...                                              
diff --git a/base/testfiles-lthooks/lthooks-errors.tlg b/base/testfiles-lthooks/lthooks-errors.tlg
index c16ca48c..1b926898 100644
--- a/base/testfiles-lthooks/lthooks-errors.tlg
+++ b/base/testfiles-lthooks/lthooks-errors.tlg
@@ -100,7 +100,7 @@ l. ...\SetDefaultHookLabel{my-document}
 LaTeX does not know anything more about this error, sorry.
 Try typing <return> to proceed.
 If that doesn't work, type X <return> to quit.
-! LaTeX hooks Error: Illegal \AddToHook{begindocument}[top-level]{...}.
+! LaTeX hooks Error: Illegal use of \AddToHook{begindocument}[top-level]{..}.
 (hooks)              'top-level' is reserved for the user's document.
 For immediate help type H <return>.
  ...                                              





More information about the latex3-commits mailing list.