[latex3-commits] [git/LaTeX3-latex3-latex2e] gh955: restore error message after rollback (and test it) (bb3cf660)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Nov 15 10:19:29 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh955
Link       : https://github.com/latex3/latex2e/commit/bb3cf6609c93fcf41f8d2fcd5fb5ec49396da5a7

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

commit bb3cf6609c93fcf41f8d2fcd5fb5ec49396da5a7
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Nov 15 10:19:29 2022 +0100

    restore error message after rollback (and test it)


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

bb3cf6609c93fcf41f8d2fcd5fb5ec49396da5a7
 base/latexrelease.dtx                                    |  5 ++++-
 .../tlb-latexrelease-rollback-2022-06-01.luatex.tlg      | 16 ++++++++++++++++
 base/testfiles/tlb-latexrelease-rollback-2022-06-01.lvt  |  5 +++++
 base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg  | 16 ++++++++++++++++
 .../tlb-latexrelease-rollback-2022-06-01.xetex.tlg       | 16 ++++++++++++++++
 5 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/base/latexrelease.dtx b/base/latexrelease.dtx
index d614e421..132a2548 100644
--- a/base/latexrelease.dtx
+++ b/base/latexrelease.dtx
@@ -803,9 +803,12 @@ of this package available from CTAN}
 \tl_clear:N \l_@@_restores_tl
 %    \end{macrocode}
 %
-% And restore the hook error message.
+% And restore the silenced error messages.
+% \changes{v1.0p}{2022/11/14}
+%     {Unsilence \cs{NewMarkClass} error message after rollback (gh/955)}
 %    \begin{macrocode}
 \msg_redirect_name:nnn { hooks } { exists } { }
+\msg_redirect_name:nnn { mark } { class-already-defined } { }
 %    \end{macrocode}
 %
 %    \begin{macrocode}
diff --git a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.luatex.tlg
index f5c31a4f..7e0295c3 100644
--- a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.luatex.tlg
@@ -741,3 +741,19 @@ Already applied: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
+test if errors are restored:
+! LaTeX hooks Error: Hook 'begindocument' has already been declared.
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewHook {begindocument}
+There already exists a hook declaration with this name.
+Please use a different name for your hook.
+! LaTeX mark Error: Mark class '2e-right' already defined
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewMarkClass {2e-right}
+This is a coding error.
+LaTeX was asked to define a new mark class called '2e-right': this mark class
+already exists.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
diff --git a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.lvt b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.lvt
index e8a27b2b..b6d605de 100644
--- a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.lvt
+++ b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.lvt
@@ -8,5 +8,10 @@
 
 \RequirePackage[2022/06/01]{latexrelease}
 
+\typeout{test if errors are restored:}
+
+\NewHook {begindocument}
+\NewMarkClass {2e-right}
+
 \END
 
diff --git a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg
index 3b531ebb..72c9e78d 100644
--- a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.tlg
@@ -1165,3 +1165,19 @@ Now handling font encoding U ...
 )
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
+test if errors are restored:
+! LaTeX hooks Error: Hook 'begindocument' has already been declared.
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewHook {begindocument}
+There already exists a hook declaration with this name.
+Please use a different name for your hook.
+! LaTeX mark Error: Mark class '2e-right' already defined
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewMarkClass {2e-right}
+This is a coding error.
+LaTeX was asked to define a new mark class called '2e-right': this mark class
+already exists.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
diff --git a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.xetex.tlg
index 157621bd..93af95f8 100644
--- a/base/testfiles/tlb-latexrelease-rollback-2022-06-01.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-2022-06-01.xetex.tlg
@@ -736,3 +736,19 @@ Already applied: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
+test if errors are restored:
+! LaTeX hooks Error: Hook 'begindocument' has already been declared.
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewHook {begindocument}
+There already exists a hook declaration with this name.
+Please use a different name for your hook.
+! LaTeX mark Error: Mark class '2e-right' already defined
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewMarkClass {2e-right}
+This is a coding error.
+LaTeX was asked to define a new mark class called '2e-right': this mark class
+already exists.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.





More information about the latex3-commits mailing list.