[latex3-commits] [git/LaTeX3-latex3-latex2e] gh963: Correctly show environments with \end part undefined (b7ea9ec4)
PhelypeOleinik
phelype.oleinik at latex-project.org
Tue Nov 29 04:53:39 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : gh963
Link : https://github.com/latex3/latex2e/commit/b7ea9ec4972845e787dad129e0903610811a9efe
>---------------------------------------------------------------
commit b7ea9ec4972845e787dad129e0903610811a9efe
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Tue Nov 29 00:53:39 2022 -0300
Correctly show environments with \end part undefined
>---------------------------------------------------------------
b7ea9ec4972845e787dad129e0903610811a9efe
base/ltdefns.dtx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/base/ltdefns.dtx b/base/ltdefns.dtx
index c66346c9..db7436b3 100644
--- a/base/ltdefns.dtx
+++ b/base/ltdefns.dtx
@@ -1861,21 +1861,26 @@
\csname\@expl at cs@to at str@@N#1 \endcsname
\@show at environment@end#1}
\long\def\@show at environment@end#1{%
- \expandafter\@show at normalenv@meaning
- \csname end\@expl at cs@to at str@@N#1\endcsname
- {\string\end{\@expl at cs@to at str@@N#1}:}}
+ \@ifundefined{end\@expl at cs@to at str@@N#1}%
+ {\@show at normalenv@undefined}%
+ {\expandafter\@show at normalenv@meaning
+ \csname end\@expl at cs@to at str@@N#1\endcsname}%
+ {\string\end{\@expl at cs@to at str@@N#1}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\long\def\@show at normalenv#1{%
\@show at normalenv@meaning#1%
- {\string\begin{\@expl at cs@to at str@@N#1}=environment:}%
+ {\string\begin{\@expl at cs@to at str@@N#1}=environment}%
\@show at environment@end#1}
\def\@show at normalenv@meaning#1#2{%
- \edef\reserved at a{#2^^J%
+ \edef\reserved at a{#2:^^J%
\@expl at cs@argument at spec@@N#1->\@expl at cs@replacement at spec@@N#1}%
\showtokens\expandafter\expandafter\expandafter{\expandafter\reserved at a}}
+\def\@show at normalenv@undefined#1{%
+ \edef\reserved at a{#1=undefined}%
+ \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved at a}}
% \end{macrocode}
%
% Now the rollback code.
More information about the latex3-commits
mailing list.