[latex3-commits] [git/LaTeX3-latex3-latex2e] gh606: Add ltnews34 entry (70912ca8)

PhelypeOleinik phelype.oleinik at latex-project.org
Mon Sep 6 15:56:13 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh606
Link       : https://github.com/latex3/latex2e/commit/70912ca825116daa007b2a8b6ad6b3058b013394

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

commit 70912ca825116daa007b2a8b6ad6b3058b013394
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Mon Sep 6 10:56:13 2021 -0300

    Add ltnews34 entry


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

70912ca825116daa007b2a8b6ad6b3058b013394
 base/doc/ltnews34.tex | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 49c79722..ae3ce570 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -217,6 +217,30 @@ document are printed. For such situations the new command
 
 
 
+\subsection{Clean up after \cs{UseOneTimeHook}}
+
+Some hooks are meant to be used only once in a document, and any further
+attempt to add code to it, causes the code to be executed immediately.
+The code for that was very simple and didn't anticipate any code trying
+to use a one-time hook twice, as in:
+\begin{verbatim}
+\UseOneTimeHook{hook}
+\UseOneTimeHook{hook}
+\end{verbatim}
+which would result in the hook code being executed twice.  This was fine
+for simple usages as in the \hook{begindocument} hook, but caused
+trouble if the one-time hook was used, for example, as an initialization
+hook, which is used once when a command is first called, then ignored in
+further calls.
+
+This issue has been addressed, and now a one-time hook will never be
+executed twice, and additionally it cleans up all the code added to it
+so far to free up some memory.
+%
+\githubissue{565}
+
+
+
 \subsection{Class, package, and include hook improvements}
 
 Classes, packages and include files can only be loaded once in a





More information about the latex3-commits mailing list.