[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks2: don't use internals elsewhere (e8351ee9)
Frank Mittelbach
frank.mittelbach at latex-project.org
Mon Aug 17 17:20:46 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : lthooks2
Link : https://github.com/latex3/latex2e/commit/e8351ee90d026f447ca46cdd7684dc0408d9b0e4
>---------------------------------------------------------------
commit e8351ee90d026f447ca46cdd7684dc0408d9b0e4
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Aug 17 17:20:46 2020 +0200
don't use internals elsewhere
>---------------------------------------------------------------
e8351ee90d026f447ca46cdd7684dc0408d9b0e4
base/ltclass.dtx | 4 ++--
base/ltfilehook.dtx | 6 ++++++
base/ltfiles.dtx | 8 +-------
base/lthooks.dtx | 23 +++++++++++++++++++++++
base/ltmiscen.dtx | 4 +---
base/ltshipout.dtx | 4 ++--
6 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 83dae638..bcae81bc 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -614,8 +614,8 @@
% \fmi{Properly integrate in the kernel}
% \begin{macrocode}
\ExplSyntaxOn
-\tl_gput_left:Nn \@pushfilename { \__hook_curr_name_push:n { } }
-\tl_gput_left:Nn \@popfilename { \__hook_curr_name_pop: }
+\tl_gput_left:Nn \@pushfilename{\@expl@@hook at curr@name at push@n{}}
+\tl_gput_left:Nn \@popfilename {\@expl@@hook at curr@name at pop@}
\ExplSyntaxOff
% \end{macrocode}
%
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 02c22ab5..1e490eb5 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -1391,6 +1391,12 @@
\immediate\closeout\@partaux
\fi
\else
+% \end{macrocode}
+% If the file is not included, reset |\deadcycles|, so that a long
+% list of non-included files does not generate an `Output loop'
+% error.
+% \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
+% \begin{macrocode}
\deadcycles\z@
\@nameuse{cp@#1}%
\fi
diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index fe6db539..cb7c452e 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -746,7 +746,7 @@
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
-%<latexrelease> {\@include}{Spaces in file names}%
+%<latexrelease> {\@include}{Spaces in file names and hooks}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -775,12 +775,6 @@
\immediate\closeout\@partaux
\fi
\else
-% \end{macrocode}
-% If the file is not included, reset |\deadcycles|, so that a long
-% list of non-included files does not generate an `Output loop'
-% error.
-% \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
-% \begin{macrocode}
\deadcycles\z@
\@nameuse{cp@#1}%
\fi
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 1c3d7b98..b7ee9034 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -3561,6 +3561,29 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
+% \subsection{Internal commands needed elsewhere}
+%
+% \begin{macro}{\@expl@@initialize at all@,
+% \@expl@@hook at curr@name at push@n,
+% \@expl@@hook at curr@name at pop@}
+%
+% \begin{macrocode}
+%<@@=>
+\cs_new_eq:NN \@expl@@initialize at all@
+ \__hook_initialize_all:
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@hook at curr@name at push@n
+ \__hook_curr_name_push:n
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@expl@@hook at curr@name at pop@
+ \__hook_curr_name_pop:
+%<@@=hook>
+% \end{macrocode}
+% \end{macro}
% \subsection{Set up existing \LaTeXe{} hooks}
%
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index fc57715d..87acd33f 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -633,12 +633,11 @@
% found all this testing is no longer needed and so we redefine
% \cs{@execute at begin@hook} to simply use the hook.
% \begin{macrocode}
-\ExplSyntaxOn
\def\@execute at begin@hook #1{
\expandafter\ifx\csname #1\endcsname\document
\endgroup
\gdef\@execute at begin@hook##1{\UseHook{env/##1/begin}}
- \__hook_initialize_all:
+ \@expl@@initialize at all@
\fi
% \end{macrocode}
% If this is an environment before \verb=\begin{document}= we just
@@ -646,7 +645,6 @@
% \begin{macrocode}
\UseHook{env/#1/begin}
}
-\ExplSyntaxOff
% \end{macrocode}
%
% The top level definition for \cs{end}. for an explanation see
diff --git a/base/ltshipout.dtx b/base/ltshipout.dtx
index 7533b9f6..2693aba6 100644
--- a/base/ltshipout.dtx
+++ b/base/ltshipout.dtx
@@ -1299,8 +1299,8 @@
\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off:
% \end{macrocode}
% \end{macro}
-
-
+%
+%
% \section{Internal commands needed elsewhere}
%
% \begin{macro}{\@expl@@shipout at add@firstpage at material@Nn,
More information about the latex3-commits
mailing list.