[latex3-commits] [git/LaTeX3-latex3-latex2e] ProvideHook: Standardise quotes in hooks and labels in messages (b710d684)
PhelypeOleinik
phelype.oleinik at latex-project.org
Fri Apr 30 04:23:49 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : ProvideHook
Link : https://github.com/latex3/latex2e/commit/b710d684d7005c1c33d19dba60d8aa5b40caf4ef
>---------------------------------------------------------------
commit b710d684d7005c1c33d19dba60d8aa5b40caf4ef
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Thu Apr 29 23:23:49 2021 -0300
Standardise quotes in hooks and labels in messages
>---------------------------------------------------------------
b710d684d7005c1c33d19dba60d8aa5b40caf4ef
base/lthooks.dtx | 14 +++++++-------
base/testfiles-lthooks/ltcmdhooks-008.tlg | 10 +++++-----
base/testfiles-lthooks/lthooks-028.tlg | 12 ++++++------
base/testfiles-lthooks/lthooks-errors.tlg | 6 +++---
4 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index e9aedd5a..26a846b4 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -4552,7 +4552,7 @@
\__kernel_msg_new:nnnn { hooks } { hook-disabled }
{ Cannot~add~code~to~disabled~hook~`#1'. }
{
- The~hook~`#1`~you~tried~to~add~code~to~was~previously~disabled~
+ The~hook~`#1'~you~tried~to~add~code~to~was~previously~disabled~
with~\iow_char:N\\hook_disable:n~or~\iow_char:N\\DisableHook,~so~
it~cannot~have~code~added~to~it.
}
@@ -4596,12 +4596,12 @@
\__kernel_msg_new:nnnn { hooks } { misused-top-level }
{
Illegal~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
- 'top-level'~is~reserved~for~the~user's~document.
+ `top-level'~is~reserved~for~the~user's~document.
}
{
- The~'top-level'~label~is~meant~for~user~code~only,~and~should~only~
+ The~`top-level'~label~is~meant~for~user~code~only,~and~should~only~
be~used~(sparingly)~in~the~main~document.~Use~the~default~label~
- '\@@_currname_or_default:'~for~this~\@cls at pkg,~or~another~
+ `\@@_currname_or_default:'~for~this~\@cls at pkg,~or~another~
suitable~label.
}
% \end{macrocode}
@@ -4650,18 +4650,18 @@
% \begin{macrocode}
\__kernel_msg_new:nnn { hooks } { provide-disabled }
{
- Can't~ provide~ hook~ #1~ because~ it~ is~ disabled!
+ Can't~ provide~ hook~ `#1'~ because~ it~ is~ disabled!
}
% \end{macrocode}
%
% \begin{macrocode}
\__kernel_msg_new:nnnn { hooks } { provide-error }
{
- Hook~ #1~ already~ declared~ as~ a~
+ Hook~`#1'~ already~ declared~ as~ a~
\@@_if_reversed:nTF {#1} { reversed } { normal }~ hook!
}
{
- You~ attempted~ to~ provide~ the~ hook~ #1~ as~ a~
+ You~ attempted~ to~ provide~ the~ hook~`#1'~ as~ a~
\@@_if_reversed:nTF {#1} { normal } { reversed }~ hook,~ but~ it~
was~ already~ previously~ declared~ as~ a~
\@@_if_reversed:nTF {#1} { reversed } { normal }~ hook.~
diff --git a/base/testfiles-lthooks/ltcmdhooks-008.tlg b/base/testfiles-lthooks/ltcmdhooks-008.tlg
index eab38f8b..b475ef58 100644
--- a/base/testfiles-lthooks/ltcmdhooks-008.tlg
+++ b/base/testfiles-lthooks/ltcmdhooks-008.tlg
@@ -35,7 +35,7 @@ For immediate help type H <return>.
...
l. ...\AddToHook{\foo}{after}
\ShowHook{\foo}
-The hook `foo` you tried to add code to was previously disabled with
+The hook `foo' you tried to add code to was previously disabled with
\hook_disable:n or \DisableHook, so it cannot have code added to it.
-> The hook 'foo':
> The hook is not declared.
@@ -107,7 +107,7 @@ For immediate help type H <return>.
...
l. ...\AddToHookNext{\foo}{after}
\ShowHook{\foo}
-The hook `baz` you tried to add code to was previously disabled with
+The hook `baz' you tried to add code to was previously disabled with
\hook_disable:n or \DisableHook, so it cannot have code added to it.
-> The hook 'baz':
> The hook is not declared.
@@ -127,7 +127,7 @@ For immediate help type H <return>.
...
l. ...\AddToHookNext{\foo}{after}
\ShowHook{\foo}
-The hook `env/foo/before` you tried to add code to was previously disabled
+The hook `env/foo/before' you tried to add code to was previously disabled
with \hook_disable:n or \DisableHook, so it cannot have code added to it.
-> The hook 'env/foo/before':
> The hook is not declared.
@@ -147,7 +147,7 @@ For immediate help type H <return>.
...
l. ...\AddToHook{\foo}{after}
\ShowHook{\foo}
-The hook `cmd/test/before` you tried to add code to was previously disabled
+The hook `cmd/test/before' you tried to add code to was previously disabled
with \hook_disable:n or \DisableHook, so it cannot have code added to it.
-> The hook 'cmd/test/before':
> The hook is not declared.
@@ -173,7 +173,7 @@ l. ...\ShowHook{\foo}
For immediate help type H <return>.
...
l. ...\AddToHook{\foo}{\ERROR 3}
-The hook `cmd/mycmd/after` you tried to add code to was previously disabled
+The hook `cmd/mycmd/after' you tried to add code to was previously disabled
with \hook_disable:n or \DisableHook, so it cannot have code added to it.
-> The hook 'cmd/mycmd/after':
> The hook is not declared.
diff --git a/base/testfiles-lthooks/lthooks-028.tlg b/base/testfiles-lthooks/lthooks-028.tlg
index c6b14236..a823e8e8 100644
--- a/base/testfiles-lthooks/lthooks-028.tlg
+++ b/base/testfiles-lthooks/lthooks-028.tlg
@@ -2,21 +2,21 @@ This is a generated file for the l3build validation system.
Don't change this file in any respect.
(lthooks-028-pkg.sty
! LaTeX3 Error: Illegal \AddToHook{begindocument}[top-level]{...}.
-(LaTeX3) 'top-level' is reserved for the user's document.
+(LaTeX3) `top-level' is reserved for the user's document.
For immediate help type H <return>.
...
l. ......ypeout{'top-level' from \jobname-pkg}\OMIT}
-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
+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.
)
! LaTeX3 Error: Illegal \AddToHook{begindocument}[top-level]{...}.
-(LaTeX3) 'top-level' is reserved for the user's document.
+(LaTeX3) `top-level' is reserved for the user's document.
For immediate help type H <return>.
...
l. ......eout{'top-level' with changed label}\OMIT}
-The 'top-level' label is meant for user code only, and should only be used
-(sparingly) in the main document. Use the default label 'not-top-level' for
+The `top-level' label is meant for user code only, and should only be used
+(sparingly) in the main document. Use the default label `not-top-level' for
this package, or another suitable label.
from lthooks-028-pkg
'top-level' with default label
diff --git a/base/testfiles-lthooks/lthooks-errors.tlg b/base/testfiles-lthooks/lthooks-errors.tlg
index 15935e1b..a4cc3f32 100644
--- a/base/testfiles-lthooks/lthooks-errors.tlg
+++ b/base/testfiles-lthooks/lthooks-errors.tlg
@@ -52,12 +52,12 @@ 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.
! LaTeX3 Error: Illegal \AddToHook{begindocument}[top-level]{...}.
-(LaTeX3) 'top-level' is reserved for the user's document.
+(LaTeX3) `top-level' is reserved for the user's document.
For immediate help type H <return>.
...
l. ......ook{begindocument}[top-level]{not allowed}
-The 'top-level' label is meant for user code only, and should only be used
-(sparingly) in the main document. Use the default label 'my-document' for this
+The `top-level' label is meant for user code only, and should only be used
+(sparingly) in the main document. Use the default label `my-document' for this
package, or another suitable label.
! LaTeX3 Error: You cannot change the default label to `top-level'. Illegal
(LaTeX3) \SetDefaultHookLabel{top-level}
More information about the latex3-commits
mailing list.