[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks2: start integrating individual hooks (669c803b)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Aug 18 11:32:37 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : lthooks2
Link       : https://github.com/latex3/latex2e/commit/669c803b4e3ff762ae1cbb4ef0245f3098f7d71e

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

commit 669c803b4e3ff762ae1cbb4ef0245f3098f7d71e
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Aug 18 11:32:37 2020 +0200

    start integrating individual hooks


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

669c803b4e3ff762ae1cbb4ef0245f3098f7d71e
 base/latexrelease.ins                  |  6 ++-
 base/ltfilehook.dtx                    | 30 +++++++++++----
 base/ltfiles.dtx                       | 13 +++++++
 base/ltfssini.dtx                      |  7 ++--
 base/lthooks.dtx                       | 68 +++++++++++++---------------------
 base/ltmiscen.dtx                      | 18 +++++++++
 base/ltshipout.dtx                     | 27 ++++++++++----
 base/testfiles-lthooks/lthooks-000.tlg |  7 ++--
 base/testfiles-lthooks/lthooks-001.tlg | 21 +++++------
 base/testfiles-lthooks/lthooks-002.tlg | 21 +++++------
 base/testfiles-lthooks/lthooks-003.tlg | 14 +++----
 base/testfiles-lthooks/lthooks-004.tlg | 14 +++----
 base/testfiles-lthooks/lthooks-005.tlg | 14 +++----
 base/testfiles-lthooks/lthooks-006.tlg | 14 +++----
 base/testfiles-lthooks/lthooks-007.tlg | 21 +++++------
 base/testfiles-lthooks/lthooks-008.tlg | 20 +++++-----
 base/testfiles-lthooks/lthooks-009.tlg |  7 ++--
 base/testfiles-lthooks/lthooks-011.tlg | 28 ++++++--------
 base/testfiles-lthooks/lthooks-013.tlg |  7 ++--
 base/testfiles-lthooks/lthooks-021.tlg |  7 ++--
 20 files changed, 191 insertions(+), 173 deletions(-)

diff --git a/base/latexrelease.ins b/base/latexrelease.ins
index 6e7abae6..99af17e8 100644
--- a/base/latexrelease.ins
+++ b/base/latexrelease.ins
@@ -86,8 +86,9 @@ extension .ins) which are part of the distribution.
   \from{ltvers.dtx}      {latexrelease}%
   \from{latexrelease.dtx}{latexrelease}%
   \from{ltdirchk.dtx}    {latexrelease}%
-  \from{lthooks.dtx}     {latexrelease}% empty  % L3 layer module
+  \from{ltexpl.dtx}      {latexrelease}% empty 
   \from{ltdefns.dtx}     {latexrelease}%
+  \from{lthooks.dtx}     {latexrelease}% empty  % L3 layer module
   \from{ltalloc.dtx}     {latexrelease}% empty
   \from{ltcntrl.dtx}     {latexrelease}% empty
   \from{lterror.dtx}     {latexrelease}% empty
@@ -107,7 +108,8 @@ extension .ins) which are part of the distribution.
   \from{ltidxglo.dtx}    {latexrelease}% empty
   \from{ltbibl.dtx}      {latexrelease}% empty
   \from{ltpage.dtx}      {latexrelease}% empty
-  \from{ltshipout.dtx}   {latexrelease}%        % L3 layer module
+  \from{ltfilehook.dtx}  {latexrelease}% empty  % L3 layer module
+  \from{ltshipout.dtx}   {latexrelease}% empty  % L3 layer module
   \from{ltoutput.dtx}    {latexrelease}%
   \from{ltclass.dtx}     {latexrelease,tracerollback}%
   \from{ltspace.dtx}     {latexrelease}%
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 075b4f09..1cfaf8d3 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -1,20 +1,34 @@
 % \iffalse meta-comment
 %
-%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%%                                         Phelype Oleinik & LaTeX Team
 %
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License (LPPL), either version 1.3c of this
-% license or (at your option) any later version.  The latest version
-% of this license is in the file
+% This file is part of the LaTeX base system.
+% -------------------------------------------
 %
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
 %    https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
 %
+% This file has the LPPL maintenance status "maintained".
 %
-% The development version of the bundle can be found below
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
 %
-%    https://github.com/FrankMittelbach/...
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
 %
-% for those people who are interested or want to report an issue.
+% \fi
+%
+% \iffalse
+%
+%%% From File: ltshipout.dtx
 %
 %    \begin{macrocode}
 \providecommand\ltfilehookversion{v0.9b}
diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index 2b52292d..da15ce94 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -415,6 +415,19 @@
 %    horizontal mode, so ignore the space after |\begin{document}|.
 %    \begin{macrocode}
   \ignorespaces}
+%    \end{macrocode}
+%
+%    The \hook{begindocument} hook already existed in the kernel since
+%    1994 under the name \cs{atbegindocumenthook} the 
+%    additional ones are originally from the \pkg{etoolbox}
+%    package under the names \cs{@endpreamblehook} \cs{afterpreamble}.
+%    \begin{macrocode}
+\NewHook{begindocument}
+\NewHook{begindocument/before}
+\NewHook{begindocument/end}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx
index 1445fc28..1b5e941f 100644
--- a/base/ltfssini.dtx
+++ b/base/ltfssini.dtx
@@ -699,9 +699,10 @@
 %    FMi: proper integration needed: these are now already declared
 %    hooks (move from lthooks here).
 %    \begin{macrocode}
-%\let\@rmfamilyhook\@empty
-%\let\@sffamilyhook\@empty
-%\let\@ttfamilyhook\@empty
+\NewHook{rmfamily}
+\NewHook{sffamily}
+\NewHook{ttfamily}
+\NewHook{defaultfamily}     % that name needs changing?
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index e9cb56cd..4fd68dd6 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -1,20 +1,34 @@
 % \iffalse meta-comment
 %
-%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach,
+%%                                      Phelype Oleinik & LaTeX Team
 %
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License (LPPL), either version 1.3c of this
-% license or (at your option) any later version.  The latest version
-% of this license is in the file
+% This file is part of the LaTeX base system.
+% -------------------------------------------
 %
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
 %    https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
 %
+% This file has the LPPL maintenance status "maintained".
 %
-% The development version of the bundle can be found below
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
 %
-%    https://github.com/FrankMittelbach/...
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
 %
-% for those people who are interested or want to report an issue.
+% \fi
+%
+% \iffalse
+%
+%%% From File: lthooks.dtx
 %
 %    \begin{macrocode}
 \def\lthooksversion{v0.9f}
@@ -3603,8 +3617,6 @@
 %    \end{macrocode}
 %    
 %    \begin{macrocode}
-  \NewHook{begindocument}
-  \NewHook{enddocument}
 %    \end{macrocode}
 %    We need to initialize the mechanism at \verb=\begin{document}=
 %    but obviously before everything else, so we sneak\footnote{This
@@ -3620,15 +3632,14 @@
 %    \end{macrocode}
 %    There aren't many other hooks at the moment:
 %    \begin{macrocode}
-  \NewHook{rmfamily}
-  \NewHook{sffamily}
-  \NewHook{ttfamily}
-  \NewHook{defaultfamily}
 %    \end{macrocode}
 %    Not checked what this one does and whether it should be there (or
 %    is a real ``hook''.
 %    \begin{macrocode}
-  \NewHook{documentclass}
+
+
+  %   \NewHook{documentclass}   guess we drop that one
+  
 %    \end{macrocode}
 %    
 %    \begin{macrocode}
@@ -3674,14 +3685,6 @@
 \ExplSyntaxOff
 %    \end{macrocode}
 %
-%    The \hook{begindocument} hook was already set up earlier, here are now
-%    the additional one (originally from the \pkg{etoolbox}
-%    package under the names \cs{@endpreamblehook} \cs{afterpreamble}).
-%    \begin{macrocode}
-\NewHook{begindocument/before}
-\NewHook{begindocument/end}
-%    \end{macrocode}
-%
 %
 %  \begin{macro}{\document}
 %    
@@ -3715,28 +3718,9 @@
 %    The \hook{enddocument} hook was already set up earlier, here are now
 %    the additional ones:
 %    \begin{macrocode}
-\NewHook{enddocument/afterlastpage}
-\NewHook{enddocument/afteraux}
-\NewHook{enddocument/info}
-\NewHook{enddocument/end}
 %    \end{macrocode}
 
 
-
-%  \begin{macro}{\enddocument}
-%    
-%    
-%    \begin{macrocode}
-
-%    \end{macrocode}
-%    
-% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
-%    \begin{macrocode}
-\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
-\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
-\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
-%    \end{macrocode}
-%  \end{macro}
 %
 %
 % \subsection{Adjusting at \pkg{atveryend} interfaces}
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index 87acd33f..a5e22870 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -254,6 +254,24 @@
    \UseOneTimeHook{enddocument/end}%
    \deadcycles\z@\@@end}
 %    \end{macrocode}
+%
+%    The public hooks used in \cs{enddocument}:
+%    \begin{macrocode}
+\NewHook{enddocument}
+\NewHook{enddocument/afterlastpage}
+\NewHook{enddocument/afteraux}
+\NewHook{enddocument/info}
+\NewHook{enddocument/end}
+%    \end{macrocode}
+%
+%    This is one of the few places where we already add data and rules
+%    to a hook already in the kernel.
+% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
+%    \begin{macrocode}
+\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
+\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
+\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
+%    \end{macrocode}
 %  \end{macro}
 %  \end{environment}
 %
diff --git a/base/ltshipout.dtx b/base/ltshipout.dtx
index 23a055c0..bf7904e5 100644
--- a/base/ltshipout.dtx
+++ b/base/ltshipout.dtx
@@ -2,19 +2,32 @@
 %
 %% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
 %
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License (LPPL), either version 1.3c of this
-% license or (at your option) any later version.  The latest version
-% of this license is in the file
+% This file is part of the LaTeX base system.
+% -------------------------------------------
 %
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
 %    https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
 %
+% This file has the LPPL maintenance status "maintained".
 %
-% The development version of the bundle can be found below
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
 %
-%    https://github.com/FrankMittelbach/...
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
 %
-% for those people who are interested or want to report an issue.
+% \fi
+%
+% \iffalse
+%
+%%% From File: ltshipout.dtx
 %
 %    \begin{macrocode}
 \providecommand\ltshipoutversion{v0.9d}
diff --git a/base/testfiles-lthooks/lthooks-000.tlg b/base/testfiles-lthooks/lthooks-000.tlg
index 6dae641e..c87bf3d1 100644
--- a/base/testfiles-lthooks/lthooks-000.tlg
+++ b/base/testfiles-lthooks/lthooks-000.tlg
@@ -1,14 +1,13 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-001.tlg b/base/testfiles-lthooks/lthooks-001.tlg
index f7d31885..8f033cb0 100644
--- a/base/testfiles-lthooks/lthooks-001.tlg
+++ b/base/testfiles-lthooks/lthooks-001.tlg
@@ -7,14 +7,13 @@ braces):
 >  {label1}  =>  {foo}
 >  {label2}  =>  {bar}.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -54,14 +53,13 @@ braces):
 >  {label1}  =>  {foo}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -73,14 +71,13 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {shipout/lastpage}
 >  {xxx}.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-002.tlg b/base/testfiles-lthooks/lthooks-002.tlg
index d1f65579..335df3a4 100644
--- a/base/testfiles-lthooks/lthooks-002.tlg
+++ b/base/testfiles-lthooks/lthooks-002.tlg
@@ -7,14 +7,13 @@ braces):
 >  {label1}  =>  {foo}
 >  {label2}  =>  {bar}.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -56,14 +55,13 @@ braces):
 >  {top-level}  =>  {baz}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -75,14 +73,13 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {shipout/lastpage}
 >  {xxx}.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-003.tlg b/base/testfiles-lthooks/lthooks-003.tlg
index d0cba6c1..39d45329 100644
--- a/base/testfiles-lthooks/lthooks-003.tlg
+++ b/base/testfiles-lthooks/lthooks-003.tlg
@@ -22,14 +22,13 @@ braces):
 >  {label9}  =>  { foo9}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -52,14 +51,13 @@ The hook xxx contains the rules:
 >  {label9|label2}  =>  {<}
 >  {label9|label5}  =>  {<}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-004.tlg b/base/testfiles-lthooks/lthooks-004.tlg
index 76a1bace..f029c91f 100644
--- a/base/testfiles-lthooks/lthooks-004.tlg
+++ b/base/testfiles-lthooks/lthooks-004.tlg
@@ -12,14 +12,13 @@ braces):
 >  {label4}  =>  { foo4}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -36,14 +35,13 @@ The hook xxx contains the rules:
 >  {label3|label2}  =>  {>}
 >  {label4|label1}  =>  {<}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-005.tlg b/base/testfiles-lthooks/lthooks-005.tlg
index ea8d7c1a..65a5988a 100644
--- a/base/testfiles-lthooks/lthooks-005.tlg
+++ b/base/testfiles-lthooks/lthooks-005.tlg
@@ -29,14 +29,13 @@ braces):
 >  {label9}  =>  { foo9}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -59,14 +58,13 @@ The hook xxx contains the rules:
 >  {label9|label2}  =>  {<} (default)
 >  {label9|label5}  =>  {<}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-006.tlg b/base/testfiles-lthooks/lthooks-006.tlg
index c9aa044d..ca9e8cda 100644
--- a/base/testfiles-lthooks/lthooks-006.tlg
+++ b/base/testfiles-lthooks/lthooks-006.tlg
@@ -10,14 +10,13 @@ braces):
 >  {label3}  =>  { foo3}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -32,14 +31,13 @@ The hook xxx contains the rules:
 >  {label2|label1}  =>  {xW}
 >  {label3|label2}  =>  {<}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-007.tlg b/base/testfiles-lthooks/lthooks-007.tlg
index 0dce76e5..0d31ed73 100644
--- a/base/testfiles-lthooks/lthooks-007.tlg
+++ b/base/testfiles-lthooks/lthooks-007.tlg
@@ -10,14 +10,13 @@ braces):
 >  {label3}  =>  { foo3}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -33,14 +32,13 @@ The hook xxx contains the rules:
 >  {label3|label1}  =>  {>} (default)
 >  {label3|label2}  =>  {<}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -82,14 +80,13 @@ All initialized (non-empty) hooks:
  shipout/firstpage -> \bool_lazy_and:nnT {\cs_if_exist_p:N \g__kernel_backend_header_bool }{\g__kernel_backend_header_bool }{\__kernel_backend_literal:n {header=l3backend-dvips.pro}}\g__hook_shipout/firstpage_next_code_tl  
  xxx ->  foo1 foo3\g__hook_xxx_next_code_tl  
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-008.tlg b/base/testfiles-lthooks/lthooks-008.tlg
index ae7d88cb..4ac019b8 100644
--- a/base/testfiles-lthooks/lthooks-008.tlg
+++ b/base/testfiles-lthooks/lthooks-008.tlg
@@ -14,14 +14,13 @@ after hook code loaded code}\typeout {baz}\typeout {on top-level}}
 >  {mypackage}  =>  {\typeout {from my package}}.
 The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {begindocument}
->  {enddocument}
+>  {begindocument/before}
+>  {begindocument/end}
 >  {rmfamily}
 >  {sffamily}
 >  {ttfamily}
 >  {defaultfamily}
->  {documentclass}
->  {begindocument/before}
->  {begindocument/end}
+>  {enddocument}
 >  {enddocument/afterlastpage}
 >  {enddocument/afteraux}
 >  {enddocument/info}
@@ -35,6 +34,12 @@ The hook enddocument contains the rules:
 >  {top-level|label1}  =>  {<}
 >  {top-level|label2}  =>  {>}
 Update code for hook 'begindocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'rmfamily' on input line ...:
+Update code for hook 'sffamily' on input line ...:
+Update code for hook 'ttfamily' on input line ...:
+Update code for hook 'defaultfamily' on input line ...:
 Update code for hook 'enddocument' on input line ...:
   normal rule top-level|label1: < found
   normal rule top-level|label2: > found
@@ -49,13 +54,6 @@ Handled code for label2
 Handled code for mypackage
 Handled code for top-level
 Handled code for label1
-Update code for hook 'rmfamily' on input line ...:
-Update code for hook 'sffamily' on input line ...:
-Update code for hook 'ttfamily' on input line ...:
-Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-009.tlg b/base/testfiles-lthooks/lthooks-009.tlg
index 0ffb9ca1..889558cd 100644
--- a/base/testfiles-lthooks/lthooks-009.tlg
+++ b/base/testfiles-lthooks/lthooks-009.tlg
@@ -2,7 +2,8 @@ This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 **** Add to hook sffamily (legacy) on input line ... <- \typeout {Std sffamily code}
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Code labels for sorting:
@@ -12,9 +13,7 @@ Data structure for label rules:
 Handled code for legacy
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-011.tlg b/base/testfiles-lthooks/lthooks-011.tlg
index 9313016c..9ef02ee1 100644
--- a/base/testfiles-lthooks/lthooks-011.tlg
+++ b/base/testfiles-lthooks/lthooks-011.tlg
@@ -2,14 +2,13 @@ This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 **** Add to hook xxx (front) on input line ... <- foo
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -44,14 +43,13 @@ All initialized (non-empty) hooks:
  xxx -> foo\g__hook_xxx_next_code_tl  
 **** Add to hook xxx (rear) on input line ... <- bar
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -88,14 +86,13 @@ All initialized (non-empty) hooks:
  xxx -> foobar\g__hook_xxx_next_code_tl  
 **** Add to hook xxx (labels) on input line ... <- baz
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
@@ -134,14 +131,13 @@ All initialized (non-empty) hooks:
  xxx -> foobarbaz\g__hook_xxx_next_code_tl  
 **** Add to hook xxx (return) on input line ... <- boom
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-013.tlg b/base/testfiles-lthooks/lthooks-013.tlg
index 176cdb8a..f584839a 100644
--- a/base/testfiles-lthooks/lthooks-013.tlg
+++ b/base/testfiles-lthooks/lthooks-013.tlg
@@ -64,14 +64,13 @@ The hook 'bar':
  Hook is not declared!
  The hook is empty.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:
diff --git a/base/testfiles-lthooks/lthooks-021.tlg b/base/testfiles-lthooks/lthooks-021.tlg
index 4c270fbd..2570e5c7 100644
--- a/base/testfiles-lthooks/lthooks-021.tlg
+++ b/base/testfiles-lthooks/lthooks-021.tlg
@@ -1,14 +1,13 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 Update code for hook 'begindocument' on input line ...:
-Update code for hook 'enddocument' on input line ...:
+Update code for hook 'begindocument/before' on input line ...:
+Update code for hook 'begindocument/end' on input line ...:
 Update code for hook 'rmfamily' on input line ...:
 Update code for hook 'sffamily' on input line ...:
 Update code for hook 'ttfamily' on input line ...:
 Update code for hook 'defaultfamily' on input line ...:
-Update code for hook 'documentclass' on input line ...:
-Update code for hook 'begindocument/before' on input line ...:
-Update code for hook 'begindocument/end' on input line ...:
+Update code for hook 'enddocument' on input line ...:
 Update code for hook 'enddocument/afterlastpage' on input line ...:
 Update code for hook 'enddocument/afteraux' on input line ...:
 Update code for hook 'enddocument/info' on input line ...:





More information about the latex3-commits mailing list.