[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct doc hook 'used' logic (5c3b8d2)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Jun 7 08:56:35 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/5c3b8d281f107dac1e0eae0b14049669a292d581
>---------------------------------------------------------------
commit 5c3b8d281f107dac1e0eae0b14049669a292d581
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Jun 7 07:44:30 2019 +0100
Correct doc hook 'used' logic
>---------------------------------------------------------------
5c3b8d281f107dac1e0eae0b14049669a292d581
l3trial/l3hooks/l3hooks.dtx | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/l3trial/l3hooks/l3hooks.dtx b/l3trial/l3hooks/l3hooks.dtx
index 95e5c00..b31e0e9 100644
--- a/l3trial/l3hooks/l3hooks.dtx
+++ b/l3trial/l3hooks/l3hooks.dtx
@@ -248,7 +248,7 @@
{
\prop_new:c { g_@@_document_ #1 _prop }
\seq_new:c { g_@@_document_ #1 _seq }
- \bool_new:c { g_@@_document_ #1 _bool }
+ \bool_new:c { g_@@_document_ #1 _used_bool }
}
{
\__kernel_msg_error:nnn { hooks }
@@ -272,7 +272,11 @@
{
\seq_if_exist:cTF { g_@@_document_ #1 _seq }
{
- \bool_if:cTF { g_@@_document_ #1 _bool }
+ \bool_if:cTF { g_@@_document_ #1 _used_bool }
+ {
+ \__kernel_msg_error:nnn { hooks }
+ { document-hook-used } {#1} { add~to }
+ }
{
\seq_gpush:cn { g_@@_document_ #1 _seq } {#2}
\prop_gput:cnn { g_@@_document_ #1 _prop } {#2} {#3}
@@ -299,17 +303,17 @@
{ unknown-document-hook } {#1}
}
{
- \bool_if:cTF { g_@@_document_ #1 _bool }
+ \bool_if:cTF { g_@@_document_ #1 _used_bool }
{
- \bool_gset_true:c { g_@@_document_ #1 _bool }
+ \__kernel_msg_error:nnn { hooks }
+ { document-hook-used } {#1} { use }
+ }
+ {
+ \bool_gset_true:c { g_@@_document_ #1 _used_bool }
\cs_set:Npn \@@_use:n ##1
{ \prop_item:cn { g_@@_document_ #1 _prop } {##1} }
\seq_map_function:cN { g_@@_document_ #1 _seq } \@@_use:n
}
- {
- \__kernel_msg_error:nnn { hooks }
- { document-hook-used } {#1} { use }
- }
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list