[latex3-commits] [git/LaTeX3-latex3-latex2e] develop, gh386: Clarify \hook_if_empty:nTF for generic hooks (6410c484)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sun Sep 6 23:58:16 CEST 2020
Repository : https://github.com/latex3/latex2e
On branches: develop,gh386
Link : https://github.com/latex3/latex2e/commit/6410c484b5b23f72a5ddcaafcc931eb2adf1c050
>---------------------------------------------------------------
commit 6410c484b5b23f72a5ddcaafcc931eb2adf1c050
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Sun Sep 6 18:58:16 2020 -0300
Clarify \hook_if_empty:nTF for generic hooks
>---------------------------------------------------------------
6410c484b5b23f72a5ddcaafcc931eb2adf1c050
base/ltfilehook.dtx | 2 +-
base/lthooks.dtx | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 73018c68..3e3ee442 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -28,7 +28,7 @@
%
% \iffalse
%
-%%% From File: ltshipout.dtx
+%%% From File: ltfilehook.dtx
%
% \begin{macrocode}
\providecommand\ltfilehookversion{v1.0a}
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index b1e39857..8ccf7bd3 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -599,6 +599,10 @@
% to adding and removing code from it, so this test should be used
% sparingly.
%
+% Generic hooks are declared at the time code is added to them, so the
+% result of \cs{hook_if_exist:n} will change once code is added to
+% said hook (unless the hook was previously declared).
+%
% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
% A leading |.| is treated literally.
% \end{function}
@@ -796,14 +800,16 @@
% branches to either \meta{true code} or \meta{false code} depending
% on the result.
%
-% \fmi{what are the results for generic hooks that do not need to be declared?}
-%
% The existence of a hook usually doesn't mean much from the viewpoint
% of code that tries to add/remove code from that hook, since package
% loading order may vary, thus the creation of hooks is asynchronous
% to adding and removing code from it, so this test should be used
% sparingly.
%
+% Generic hooks are declared at the time code is added to them, so the
+% result of \cs{hook_if_exist:n} will change once code is added to
+% said hook (unless the hook was previously declared).
+%
% The \meta{hook} \emph{cannot} be specified using the dot-syntax.
% A leading |.| is treated literally.
% \end{function}
More information about the latex3-commits
mailing list.