summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltclass.dtx')
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltclass.dtx20
1 files changed, 16 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
index 6167cf56085..52580eaf54b 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2024
+% Copyright (C) 1993-2025
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2024/08/28 v1.5m LaTeX Kernel (Class & Package Interface)]
+ [2025/01/02 v1.5n LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -2808,8 +2808,20 @@
%<*2ekernel>
% \end{macrocode}
%
-% \begin{macrocode}
-\@onlypreamble\AtBeginDocument
+% In its initial implementation (not using the hook system)
+% \cs{AtBeginDocument} was made \cs{@onlypreamble} because using it
+% later had no effect whatsoever, thus was most certainly an
+% unintended programming error. With the reimplementation, using
+% the \texttt{begindocument} hook internally, this has changed
+% because adding to a onetime hook after it has already been used
+% simply executes the additional code immediately. We therefore no
+% longer generate an error if it is used inside the document so
+% that \verb=\AddToHook{begindocument}= and \cs{AtBeginDocument}
+% are truly equivalent (as claimed in the hook documentation).
+% \changes{v1.5n}{2025/01/02}{Do not make \cs{AtBeginDocument}
+% preamble only (gh/1604)}
+% \begin{macrocode}
+%\@onlypreamble\AtBeginDocument
% \end{macrocode}
% \end{macro}
% \end{macro}