[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Add missing interfaces (f7a8478d)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sat Mar 11 03:06:36 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : hook-args
Link : https://github.com/latex3/latex2e/commit/f7a8478d403f830b654310b032384e0f9b72536a
>---------------------------------------------------------------
commit f7a8478d403f830b654310b032384e0f9b72536a
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Wed Dec 14 01:50:06 2022 -0300
Add missing interfaces
>---------------------------------------------------------------
f7a8478d403f830b654310b032384e0f9b72536a
base/lthooks.dtx | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 0f3b7de6..466209f6 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2618,11 +2618,16 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\hook_new_pair:nn}
+% \begin{macro}{\hook_new_pair:nn,\hook_new_pair_with_args:nnn}
% A shorthand for declaring a normal and a (matching) reversed hook in one go.
% \begin{macrocode}
\cs_new_protected:Npn \hook_new_pair:nn #1#2
{ \hook_new:n {#1} \hook_new_reversed:n {#2} }
+\cs_new_protected:Npn \hook_new_pair_with_args:nnn #1#2#3
+ {
+ \hook_new_with_args:nn {#1} {#3}
+ \hook_new_reversed_with_args:nn {#2} {#3}
+ }
% \end{macrocode}
% \end{macro}
%
@@ -5422,17 +5427,34 @@
%
%
%
+% \begin{macro}{\NewHook,\NewReversedHook,\NewMirroredHookPair}
+% Declaring new hooks \ldots
+% \begin{macrocode}
+\NewDocumentCommand \NewHookWithArguments { mm }
+ { \hook_new_with_args:nn {#1} {#2} }
+\NewDocumentCommand \NewReversedHookWithArguments { mm }
+ { \hook_new_reversed_with_args:nn {#1} {#2} }
+\NewDocumentCommand \NewMirroredHookPairWithArguments { mmm }
+ { \hook_new_pair_with_args:nnn {#1} {#2} {#3} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \begin{macrocode}
%<latexrelease>\IncludeInRelease{2021/06/01}%
%<latexrelease> {\hook_activate_generic:n}{Providing~hooks}
% \end{macrocode}
%
-% \begin{macro}{\ActivateGenericHook}
+% \begin{macro}{\ActivateGenericHook,\ActivateGenericHookWithArguments}
% Providing new hooks \ldots
% \changes{v1.0m}{2021/04/29}{Add \cs{ProvideHook} etc.}
% \changes{v1.0o}{2021/08/02}{Change name}
% \begin{macrocode}
-\NewDocumentCommand \ActivateGenericHook { m }{ \hook_activate_generic:n {#1} }
+\NewDocumentCommand \ActivateGenericHook { m }
+ { \hook_activate_generic:n {#1} }
+\NewDocumentCommand \ActivateGenericHookWithArguments { mm }
+ { \hook_activate_generic_with_args:nn {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
@@ -5440,7 +5462,8 @@
% Disabling a generic hook.
% \changes{v1.0o}{2021/08/02}{Change name}
% \begin{macrocode}
-\NewDocumentCommand \DisableGenericHook { m }{ \hook_disable_generic:n {#1} }
+\NewDocumentCommand \DisableGenericHook { m }
+ { \hook_disable_generic:n {#1} }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.