[latex3-commits] [git/LaTeX3-latex3-latex2e] ltcmdhooks: Parse hook name in \hook_disable:n (fa7745ba)

PhelypeOleinik phelype.oleinik at latex-project.org
Tue Apr 20 05:26:42 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : ltcmdhooks
Link       : https://github.com/latex3/latex2e/commit/fa7745babe44d1fa8a80f63f8235459bafa843b7

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

commit fa7745babe44d1fa8a80f63f8235459bafa843b7
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Apr 20 00:26:42 2021 -0300

    Parse hook name in \hook_disable:n


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

fa7745babe44d1fa8a80f63f8235459bafa843b7
 base/lthooks.dtx | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 226ffe9b..3ac1199a 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -191,6 +191,9 @@
 %    \texttt{ltcmdhooks-doc}) as depending on the definition of the
 %    command such generic hooks may be unusable. If that is known, a
 %    package developer can disable such hooks up front.
+%
+%    The \meta{hook} can be specified using the dot-syntax to denote
+%    the current package name. See section~\ref{sec:default-label}.
 % \end{function}
 %
 %
@@ -875,6 +878,9 @@
 %    This declaration is intended for use with generic hooks that are
 %    known not to work (see \texttt{ltcmdhooks-doc}) if they receive
 %    code.
+%
+%    The \meta{hook} can be specified using the dot-syntax to denote
+%    the current package name. See section~\ref{sec:default-label}.
 % \end{function}
 %
 %
@@ -2331,6 +2337,7 @@
 % \subsubsection{Disabling hooks}
 %
 % \begin{macro}{\hook_disable:n}
+% \begin{macro}{\@@_disable:n}
 % \begin{macro}[pTF]{\@@_if_disabled:n}
 %
 %    Disables a hook by creating its
@@ -2345,6 +2352,8 @@
 %
 %    \begin{macrocode}
 \cs_new_protected:Npn \hook_disable:n #1
+  { \@@_normalize_hook_args:Nn \@@_disable:n {#1} }
+\cs_new_protected:Npn \@@_disable:n #1
   {
     \tl_gclear_new:c { g_@@_#1_declared_tl }
     \cs_undefine:c { @@~#1 }
@@ -2360,6 +2369,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 %
 % \subsection{Parsing a label}





More information about the latex3-commits mailing list.