[latex3-commits] [git/LaTeX3-latex3-latex2e] gh606: Add changes.txt and \changes entries (cb72199a)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Sep 6 15:56:42 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : gh606
Link : https://github.com/latex3/latex2e/commit/cb72199a1823aaf5a17684ecc19e36b98a1ad5d8
>---------------------------------------------------------------
commit cb72199a1823aaf5a17684ecc19e36b98a1ad5d8
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Sep 6 10:56:42 2021 -0300
Add changes.txt and \changes entries
>---------------------------------------------------------------
cb72199a1823aaf5a17684ecc19e36b98a1ad5d8
base/changes.txt | 5 +++++
base/lthooks.dtx | 11 ++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index de2c7c7f..4eac9459 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-08-30 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * lthooks.dtx (subsection{Using the hook}):
+ Clean up after \UseOneTimeHook and prevent a second usage (gh/606).
+
2021-08-30 Phelype Oleinik <phelype.oleinik at latex-project.org>
* ltcmd.dtx (subsubsection{Copying a command and its internal structure}):
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 597dbc79..2b74663e 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -31,8 +31,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\lthooksversion{v1.0q}
-\def\lthooksdate{2021/08/27}
+\def\lthooksversion{v1.0r}
+\def\lthooksdate{2021/09/06}
% \end{macrocode}
%
%<*driver>
@@ -2974,7 +2974,9 @@
\cs_new_protected:Npn \@@_gput_code:nnn #1 #2 #3
{
% \end{macrocode}
-% First check if the hook was used as a one-time hook:
+% First check if the code should be executed immediately, rather than
+% stored:
+% \changes{v1.0r}{2021/09/06}{Use dedicated conditional (gh/606)}
% \begin{macrocode}
\@@_if_execute_immediately:nTF {#1}
{#3}
@@ -4812,6 +4814,7 @@
% hook name, since \cs{hook_use:n} and \cs{hook_use_once:n} are
% documented to not trim spaces.
%
+% \changes{v1.0r}{2021/09/06}{Clean up after \cs{UseOneTimeHook} (gh/606)}
% \begin{macrocode}
\cs_new_protected:Npn \hook_use_once:n #1
{
@@ -4836,6 +4839,7 @@
% code from being added to the hook. \cs{@@_use_once_clear:n} then
% clears the hook so that any further call to \cs{hook_use:n} or
% \cs{hook_use_once:n} will expand to nothing.
+% \changes{v1.0r}{2021/09/06}{Clean up after \cs{UseOneTimeHook} (gh/606)}
% \begin{macrocode}
\cs_new_protected:Npn \@@_use_once_set:n #1
{ \@@_tl_gset:cn { g_@@_#1_reversed_tl } { I } }
@@ -4859,6 +4863,7 @@
% \cs[no-index]{g_@@_\meta{hook}_reversed_tl} is |I|. The gymnastics
% around \cs{if:w} is there to allow the |reversed| token list to be
% empty.
+% \changes{v1.0r}{2021/09/06}{Macro added (gh/606)}
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_if_execute_immediately:n #1 { F, TF }
{
More information about the latex3-commits
mailing list.