[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Only error if replacing args (4bf89c71)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Mar 8 04:25:57 CET 2023


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

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

commit 4bf89c711fbd93c48f58f35937f99c7e76eb25dc
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Wed Mar 8 00:25:57 2023 -0300

    Only error if replacing args


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

4bf89c711fbd93c48f58f35937f99c7e76eb25dc
 base/lthooks.dtx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index e6eb7ebc..dd3f373a 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -3352,7 +3352,12 @@
 %    \begin{macrocode}
     \@@_if_execute_immediately:nTF {#1}
       {
-        \msg_error:nnnn { hooks } { one-time-args } {#1} { AddToHook }
+        \@@_if_replacing_args:TF
+          {
+            \msg_error:nnnn { hooks } { one-time-args }
+              {#1} { AddToHook }
+          }
+          { }
         \use:n
       }
       { \@@_gput_code_store:nnn {#1} {#2} }





More information about the latex3-commits mailing list.