[latex3-commits] [git/LaTeX3-latex3-latex2e] gh697: Prevent time wasted debugging 50f5256 (60a6a368)

PhelypeOleinik phelype.oleinik at latex-project.org
Thu Oct 21 03:53:48 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh697
Link       : https://github.com/latex3/latex2e/commit/60a6a3681bdfe0953f8057c5a6a4e36f94ce9616

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

commit 60a6a3681bdfe0953f8057c5a6a4e36f94ce9616
Author: Phelype Oleinik <phelype.oleinik at latex-project.org>
Date:   Wed Oct 20 17:28:18 2021 -0300

    Prevent time wasted debugging 50f5256


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

60a6a3681bdfe0953f8057c5a6a4e36f94ce9616
 base/source2edoc.cls | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/base/source2edoc.cls b/base/source2edoc.cls
index ba6acf9f..bef81d99 100644
--- a/base/source2edoc.cls
+++ b/base/source2edoc.cls
@@ -61,6 +61,24 @@
     \int_compare:nNnTF \@auxout = \@partaux
       { \@latexerr{\string\include\space cannot~be~nested}\@eha }
       { \@docinclude {#1} }  % <--- braces needed!
+    \int_compare:nNnF { \tex_currentgrouplevel:D } = { 0 }
+      {
+        \int_compare:nNnT { \tex_interactionmode:D } = { 0 }
+          { \int_set:Nn \tex_interactionmode:D { 1 } }
+        \msg_fatal:nnn { source2edoc } { missing-endgroup } {#1}
+      }
+  }
+\msg_new:nnn { source2edoc } { missing-endgroup }
+  {
+    \str_if_eq:VnTF \@currenvir { document }
+      {
+        There~are~\int_use:N \tex_currentgrouplevel:D
+        \c_space_tl unclosed~groups~in~#1.dtx.
+      }
+      {
+        The~\@currenvir \c_space_tl environment~on~line~\@currenvline
+        \c_space_tl doesn't~have~a~matching~\iow_char:N\\end{\@currenvir}.
+      }
   }
 \cs_gset:Npn \@docinclude #1
   {





More information about the latex3-commits mailing list.