[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Code from 2f9ece5 can't be executed twice (fd81bdd0)
PhelypeOleinik
phelype.oleinik at latex-project.org
Thu Mar 16 04:00:09 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : hook-args
Link : https://github.com/latex3/latex2e/commit/fd81bdd0d5b328e8013ee9bfb02334bae6ce92be
>---------------------------------------------------------------
commit fd81bdd0d5b328e8013ee9bfb02334bae6ce92be
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Thu Mar 16 00:00:09 2023 -0300
Code from 2f9ece5 can't be executed twice
>---------------------------------------------------------------
fd81bdd0d5b328e8013ee9bfb02334bae6ce92be
base/lthooks.dtx | 11 +++++++++++
base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg | 6 ++++++
base/testfiles/tlb-latexrelease-rollback-003-often.tlg | 6 ++++++
base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg | 6 ++++++
4 files changed, 29 insertions(+)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index c0e75a1e..f904effe 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -6783,10 +6783,21 @@
% \end{macrocode}
%
% \begin{macrocode}
+%<latexrelease>\cs:w @@_rollback_tidying: \cs_end:
%<latexrelease>\bool_lazy_and:nnT
%<latexrelease> { \int_compare_p:nNn { \sourceLaTeXdate } > { 20230600 } }
%<latexrelease> { \int_compare_p:nNn { \requestedLaTeXdate } < { 20230601 } }
%<latexrelease> {
+%<latexrelease> \cs_gset_protected:Npn \@@_rollback_tidying:
+%<latexrelease> {
+%<latexrelease> \@latex at error { Rollback~code~executed~twice }
+%<latexrelease> {
+%<latexrelease> If~this~was~done~on~purpose~in~a~testing~
+%<latexrelease> environment,~then~there's~(hopefully)~
+%<latexrelease> to~worry.~Otherwise,~something~went~wrong.
+%<latexrelease> }
+%<latexrelease> \use_none:nnnn
+%<latexrelease> }
%<latexrelease> \cs_set:Npn \@@_tmp:w #1 #2
%<latexrelease> {
%<latexrelease> \@@_tl_gset:cx { @@#1~#2 }
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 55d7f175..566305ff 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -859,6 +859,12 @@ Skipping: [....-..-..] Hooks with args on input line ...
Skipping: [....-..-..] Hooks with args on input line ....
Applying: [....-..-..] The hook management on input line ....
END module: lthooks (....-..-..) on input line ....
+! LaTeX Error: Rollback code executed twice.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+l. ...\cs:w __hook_rollback_tidying: \cs_end:
+If this was done on purpose in a testing environment, then there's (hopefully) to worry. Otherwise, something went wrong.
BEGIN module: ltcmdhooks (....-..-..) on input line ....
The hook management system for commands.
Skipping module ltcmdhooks on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index d981279a..72187dd6 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -843,6 +843,12 @@ Skipping: [....-..-..] Hooks with args on input line ...
Skipping: [....-..-..] Hooks with args on input line ....
Applying: [....-..-..] The hook management on input line ....
END module: lthooks (....-..-..) on input line ....
+! LaTeX Error: Rollback code executed twice.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+l. ...\cs:w __hook_rollback_tidying: \cs_end:
+If this was done on purpose in a testing environment, then there's (hopefully) to worry. Otherwise, something went wrong.
BEGIN module: ltcmdhooks (....-..-..) on input line ....
The hook management system for commands.
Skipping module ltcmdhooks on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index 3c173a89..1d9821b0 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -852,6 +852,12 @@ Skipping: [....-..-..] Hooks with args on input line ...
Skipping: [....-..-..] Hooks with args on input line ....
Applying: [....-..-..] The hook management on input line ....
END module: lthooks (....-..-..) on input line ....
+! LaTeX Error: Rollback code executed twice.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+l. ...\cs:w __hook_rollback_tidying: \cs_end:
+If this was done on purpose in a testing environment, then there's (hopefully) to worry. Otherwise, something went wrong.
BEGIN module: ltcmdhooks (....-..-..) on input line ....
The hook management system for commands.
Skipping module ltcmdhooks on input line ....
More information about the latex3-commits
mailing list.