[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: No longer necessary (cd672087)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Mar 29 02:30:14 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : hook-args
Link       : https://github.com/latex3/latex2e/commit/cd6720872bab5e8d0e0e53dae4b85b473054c911

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

commit cd6720872bab5e8d0e0e53dae4b85b473054c911
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Mar 28 21:30:14 2023 -0300

    No longer necessary


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

cd6720872bab5e8d0e0e53dae4b85b473054c911
 base/lthooks.dtx | 32 ++++++++++----------------------
 1 file changed, 10 insertions(+), 22 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 724d3925..0d0f2750 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -5850,8 +5850,7 @@
 %  \end{macro}
 %
 % \begin{macro}{\@@_gput_next_code:nNn,
-%               \@@_gput_next_do:nn,
-%               \@@_gput_next_do:Nnn}
+%               \@@_gput_next_do:nn}
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_gput_next_code:nn #1 #2
   {
@@ -5866,16 +5865,8 @@
   }
 %    \end{macrocode}
 %
-%   Here we start by sanity-checking with \cs{@@_chk_args_allowed:nn},
-%   then passing the \verb|_next| macro to \cs{@@_gput_next_do:Nnn}.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_gput_next_do:nn #1
-  {
-    \@@_chk_args_allowed:nn {#1} { AddToHookNext }
-    \exp_args:Nc \@@_gput_next_do:Nnn { @@_next~#1 } {#1}
-  }
-%    \end{macrocode}
-%   First check if the ``next code'' token list is empty:  if so we need
+%   Start by sanity-checking with \cs{@@_chk_args_allowed:nn}.
+%   Then check if the ``next code'' token list is empty:  if so we need
 %   to add a \cs{tl_gclear:c} to clear it, so the code lasts for one
 %   usage only.  The token list is cleared early so that nested usages
 %   don't get lost.  \cs{tl_gclear:c} is used instead of
@@ -5885,19 +5876,18 @@
 %   list is empty, the hook code has to be updated to add the next
 %   execution token list.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_gput_next_do:Nnn #1 #2
+\cs_new_protected:Npn \@@_gput_next_do:nn #1
   {
-    \@@_cs_if_empty:cT { @@~#2 }
-      { \@@_update_hook_code:n {#2} }
-    \@@_cs_if_empty:cT { @@_next~#2 }
-      { \@@_next_gset:nn {#2} { \@@_clear_next:n {#2} } }
-    \@@_cs_gput_right:nnn { _next } {#2}
+    \@@_chk_args_allowed:nn {#1} { AddToHookNext }
+    \@@_cs_if_empty:cT { @@~#1 }
+      { \@@_update_hook_code:n {#1} }
+    \@@_cs_if_empty:cT { @@_next~#1 }
+      { \@@_next_gset:nn {#1} { \@@_clear_next:n {#1} } }
+    \@@_cs_gput_right:nnn { _next } {#1}
   }
 %    \end{macrocode}
 %  \end{macro}
 %
-%
-%
 %  \begin{macro}{\hook_gclear_next_code:n,\@@_clear_next:n}
 %    Discard anything set up for next invocation of the hook.
 % \changes{v1.0o}{2021/07/27}{Macro made public}
@@ -6136,8 +6126,6 @@
 \cs_new:Npn \hook_use_once:nw { \hook_use_once:n }
 \cs_new_protected:Npn \@@_use_once:n #1
   {
-    \tl_if_exist:cF { c_@@_#1_parameter_tl }
-      { \tl_const:cn { c_@@_#1_parameter_tl } { } }
     \@@_preamble_hook:n {#1}
     \@@_use_once_set:n {#1}
 %    \end{macrocode}





More information about the latex3-commits mailing list.