[latex3-commits] [git/LaTeX3-latex3-latex2e] gh648: Simplify after changes to generic hook detection (ea680af4)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Aug 28 04:15:35 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh648
Link       : https://github.com/latex3/latex2e/commit/ea680af4ff8eb0ac70bda15f3b24e0ddf4fa215d

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

commit ea680af4ff8eb0ac70bda15f3b24e0ddf4fa215d
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Aug 27 23:15:35 2021 -0300

    Simplify after changes to generic hook detection


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

ea680af4ff8eb0ac70bda15f3b24e0ddf4fa215d
 base/lthooks.dtx                       | 33 ++-------------------------------
 base/testfiles-lthooks/lthooks-029.tlg | 10 +++++-----
 2 files changed, 7 insertions(+), 36 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 0a37a0ba..0fc23d7e 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2611,37 +2611,8 @@
           {
             \tl_new:c { g_@@_#1_declared_tl }
             \@@_make_usable:n {#1}
-            \@@_set_hook_ordering:n {#1}
-          }
-      }
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_hook_ordering:n}
-% \begin{macro}{\@@_set_hook_ordering:wn}
-%   Sets the \cs[no-index]{g_@@_\meta{hook}_reversed_tl} token list for
-%   known generic hooks, by looking at the \meta{hook} name and matching
-%   with the known patterns.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_set_hook_ordering:n #1
-  {
-    \tl_gset:cx { g_@@_#1_reversed_tl }
-      { \@@_set_hook_ordering:wn #1 / / / \scan_stop: }
-  }
-\cs_new:Npn \@@_set_hook_ordering:wn #1 / #2 / #3 / #4 \scan_stop:
-  {
-    \tl_if_empty:nF {#2}
-      {
-        \prop_if_in:NnT \c_@@_generics_prop {#1}
-          {
-            \prop_if_in:NnTF \c_@@_generics_reversed_ii_prop {#2}
-              { - }
-              {
-                \prop_if_in:NnT \c_@@_generics_reversed_iii_prop {#3}
-                  { - }
-              }
+            \tl_gset:cx { g_@@_#1_reversed_tl }
+              { \@@_if_generic_reversed:nT {#1} { - } }
           }
       }
   }
diff --git a/base/testfiles-lthooks/lthooks-029.tlg b/base/testfiles-lthooks/lthooks-029.tlg
index 197ae5be..6d352e87 100644
--- a/base/testfiles-lthooks/lthooks-029.tlg
+++ b/base/testfiles-lthooks/lthooks-029.tlg
@@ -6,12 +6,12 @@ Don't change this file in any respect.
 > The hook is empty.
 <recently read> }
 l. ...\ShowHook{aaa}
--> The hook 'env/bbb/begin':
+-> The generic hook 'env/bbb/begin':
 > The hook is not declared.
 > The hook is empty.
 <recently read> }
 l. ...\ShowHook{env/bbb/begin}
--> The hook 'env/ccc/end':
+-> The generic hook 'env/ccc/end':
 > The hook is not declared.
 > The hook is empty.
 <recently read> }
@@ -40,7 +40,7 @@ l. ...\ShowHook{aaa}
 <recently read> }
 l. ...\ShowHook{aaa}
 ------------ activate an unknown hook with data --------------
--> The hook 'env/bbb/begin':
+-> The generic hook 'env/bbb/begin':
 > Code chunks:
 >     Y -> Y1
 > Document-level (top-level) code (executed last):
@@ -54,12 +54,12 @@ l. ...\ShowHook{aaa}
 <recently read> }
 l. ...\ShowHook{env/bbb/begin}
 ------------ activate an unknown reversed hook --------------
--> The hook 'env/ccc/end':
+-> The generic hook 'env/ccc/end':
 > The hook is empty.
 <recently read> }
 l. ...\ShowHook{env/ccc/end}
 ------------ activate an known reversed hook with data --------------
--> The hook 'env/ccc/end':
+-> The generic hook 'env/ccc/end':
 > Code chunks:
 >     Z -> Z1
 > Document-level (top-level) code (executed last):





More information about the latex3-commits mailing list.