[latex3-commits] [git/LaTeX3-latex3-latex2e] ltcmdhooks: Specify the reason the hook is not usable (64cea038)

PhelypeOleinik phelype.oleinik at latex-project.org
Tue Apr 20 05:47:25 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : ltcmdhooks
Link       : https://github.com/latex3/latex2e/commit/64cea038f8d050b054c9ee90993ac50f61d41529

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

commit 64cea038f8d050b054c9ee90993ac50f61d41529
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Apr 20 00:47:25 2021 -0300

    Specify the reason the hook is not usable


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

64cea038f8d050b054c9ee90993ac50f61d41529
 base/lthooks.dtx                          |  5 +++--
 base/testfiles-lthooks/ltcmdhooks-008.tlg | 12 ++++++------
 base/testfiles-lthooks/lthooks-028.tlg    | 10 +++++-----
 base/testfiles-lthooks2/lthooks2-006.tlg  |  2 +-
 4 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 7fa054b0..4a430071 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -3959,8 +3959,9 @@
             \@@_log_line:x { Execution~order: }
             #2
               {
-                \@spaces Not~set~because~hook~ \@@_if_usable:nTF {#1}
-                  {code~pool~empty} {is~not~usable~(disabled~or~undeclared)}
+                \@spaces Not~set~because~the~hook~ \@@_if_usable:nTF {#1}
+                  { code~pool~is~empty }
+                  { is~\@@_if_disabled:nTF {#1} {disabled} {undeclared} }
               }
           }
       }
diff --git a/base/testfiles-lthooks/ltcmdhooks-008.tlg b/base/testfiles-lthooks/ltcmdhooks-008.tlg
index 66efec84..ca0fe115 100644
--- a/base/testfiles-lthooks/ltcmdhooks-008.tlg
+++ b/base/testfiles-lthooks/ltcmdhooks-008.tlg
@@ -12,7 +12,7 @@ Don't change this file in any respect.
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\AddToHook{\foo}{before}    \ShowHook{\foo}
 -> The hook 'foo':
@@ -27,7 +27,7 @@ l. ...\AddToHook{\foo}{before}    \ShowHook{\foo}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is disabled.
 <recently read> }
 l. ...\DisableHook{\foo}          \ShowHook{\foo}
 ! Package hooks Error: Cannot add code to disabled hook `foo'.
@@ -49,7 +49,7 @@ The hook `foo` you tried to add code to was previously disabled with
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is disabled.
 <recently read> }
 l. ...\AddToHook{\foo}{after}     \ShowHook{\foo}
 =================================
@@ -64,7 +64,7 @@ l. ...\AddToHook{\foo}{after}     \ShowHook{\foo}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\AddToHook{\foo}{before}    \ShowHook{\foo}
 -> The hook 'bar':
@@ -92,7 +92,7 @@ l. ...\NewHook{\foo}              \ShowHook{\foo}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is disabled.
 <recently read> }
 l. ...\DisableHook{\foo}          \ShowHook{\foo}
 =================================
@@ -187,7 +187,7 @@ with \hook_disable:n or \DisableHook, so it cannot have code added to it.
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is disabled.
 <recently read> }
 l. ...\ShowHook{\foo}
 > \mycmd=macro:
diff --git a/base/testfiles-lthooks/lthooks-028.tlg b/base/testfiles-lthooks/lthooks-028.tlg
index 7fd19434..96b58c3e 100644
--- a/base/testfiles-lthooks/lthooks-028.tlg
+++ b/base/testfiles-lthooks/lthooks-028.tlg
@@ -46,7 +46,7 @@ l. ...\ShowHook{aaa}
 > Rules:
 >     package|other package with relation >
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\ShowHook{bbb}
 -> The hook 'bbb':
@@ -75,7 +75,7 @@ l. ...\ShowHook{bbb}
 > Rules:
 >     package|other package with relation >
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\ShowHook{ccc}
 -> The hook 'ccc':
@@ -103,7 +103,7 @@ l. ...\ShowHook{ccc}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\ShowHook{ddd}
 -> The hook 'ddd':
@@ -122,7 +122,7 @@ l. ...\ShowHook{ddd}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\ShowHook{ddd}
 -> The hook 'ddd':
@@ -146,7 +146,7 @@ l. ...\ShowHook{ddd}
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 <recently read> }
 l. ...\ShowHook{ddd}
 (lthooks-028.aux)
diff --git a/base/testfiles-lthooks2/lthooks2-006.tlg b/base/testfiles-lthooks2/lthooks2-006.tlg
index 743c67c9..fa54daa9 100644
--- a/base/testfiles-lthooks2/lthooks2-006.tlg
+++ b/base/testfiles-lthooks2/lthooks2-006.tlg
@@ -43,7 +43,7 @@ my-package added CODE:
 > Rules:
 >     ---
 > Execution order:
->     Not set because hook is not usable (disabled or undeclared).
+>     Not set because the hook is undeclared.
 -------------------
 Adding a rule:
 -> The hook 'some-hook-a':





More information about the latex3-commits mailing list.