[latex3-commits] [git/LaTeX3-latex3-latex2e] gh963: Reorder code (becfd420)

PhelypeOleinik phelype.oleinik at latex-project.org
Tue Nov 29 05:04:04 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh963
Link       : https://github.com/latex3/latex2e/commit/becfd420b896ec8b027316a08fe24579ee0a1846

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

commit becfd420b896ec8b027316a08fe24579ee0a1846
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Nov 29 01:04:04 2022 -0300

    Reorder code


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

becfd420b896ec8b027316a08fe24579ee0a1846
 base/ltdefns.dtx | 214 +++++++++++++++++++++++++++----------------------------
 1 file changed, 107 insertions(+), 107 deletions(-)

diff --git a/base/ltdefns.dtx b/base/ltdefns.dtx
index 1a4d3f58..b3c34d67 100644
--- a/base/ltdefns.dtx
+++ b/base/ltdefns.dtx
@@ -1811,113 +1811,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-%
-% \subsubsection{Showing environments}
-%
-% \begin{macro}{\ShowEnvironment}
-% \changes{v1.5s}{2022/11/24}{Added \cs{ShowEnvironment}}
-%
-%    \begin{macrocode}
-%</2ekernel>
-%<latexrelease>\IncludeInRelease{2023-06-01}{\ShowEnvironment}
-%<latexrelease>  {Add \ShowEnvironment}%
-%<*2ekernel|latexrelease>
-%    \end{macrocode}
-%
-%   \cs{ShowEnvironment} is quite similar to \cs{ShowCommand}.  We will
-%   pass the environment \meta{env} around as the macro
-%   \cs[no-index]{env}, because \cs{robust at command@act} expects a single
-%   token.
-%    \begin{macrocode}
-\def\ShowEnvironment#1{%
-  \expandafter\@show at environment\csname #1\endcsname}
-\long\def\@show at environment#1{%
-  \robust at command@act
-    \@showenvironmentlisthook#1%
-    \@show at normalenv#1}
-%    \end{macrocode}
-%
-% \begin{macro}{\@showenvironmentlisthook}
-%   This is similar to \cs{@showcommandlisthook}, but uses the dedicated
-%   versions for environments.
-%    \begin{macrocode}
-\def\@showenvironmentlisthook{%
-  {\@if at DeclareRobustCommand \@show at DeclareRobustCommand@env}%
-  {\@if at newcommand \@show at newcommand@env}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@show at newcommand@env}
-% \begin{macro}{\@show at DeclareRobustCommand@env}
-%   These are similar to the command versions below, except they say
-%   \enquote{environment} and call \cs{@show at environment@end} to print
-%   the \cs{end} part.
-%    \begin{macrocode}
-\long\def\@show at newcommand@env#1{%
-  \typeout{> \string\begin{\@expl at cs@to at str@@N#1}=environment:}%
-  \typeout{->\@expl at cs@replacement at spec@@N#1.^^J}%
-  \expandafter\@show at newcommand@aux
-    \csname\@backslashchar\@expl at cs@to at str@@N#1\expandafter\endcsname
-    \expandafter{#1}%
-  \@show at environment@end#1}
-\long\def\@show at DeclareRobustCommand@env#1{%
-  \typeout{> \string\begin{\@expl at cs@to at str@@N#1}=environment:}%
-  \typeout{->\@expl at cs@replacement at spec@@N#1.^^J}%
-  \expandafter\show at kernel@robust at command
-    \csname\@expl at cs@to at str@@N#1 \endcsname
-  \@show at environment@end#1}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@show at normalenv}
-% \begin{macro}{\@show at environment@end}
-%   A \enquote{normal} environment is straightforward.
-%   \cs{@show at environment@end} needs to check if the \cs{end} part is
-%   defined and show it accordingly, otherwise the output would show
-%   gibberish.
-%    \begin{macrocode}
-\long\def\@show at normalenv#1{%
-  \@show at normalenv@meaning#1%
-    {\string\begin{\@expl at cs@to at str@@N#1}=environment}%
-  \@show at environment@end#1}
-\long\def\@show at environment@end#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}
-% \end{macro}
-%
-% \begin{macro}{\@show at normalenv@meaning}
-% \begin{macro}{\@show at normalenv@undefined}
-%   And here the auxiliaries that do the actual printing.
-%    \begin{macrocode}
-\def\@show at normalenv@meaning#1#2{%
-  \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}
-% \end{macro}
-% \end{macro}
-%
-%   Now the rollback code.
-%    \begin{macrocode}
-%</2ekernel|latexrelease>
-%<latexrelease>\EndIncludeInRelease
-%<latexrelease>\IncludeInRelease{0000-00-00}{\ShowEnvironment}
-%<latexrelease>  {Undefine \ShowEnvironment}%
-%<latexrelease>\let\ShowEnvironment\@undefined
-%<latexrelease>\EndIncludeInRelease
-%<*2ekernel>
-%    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
 %</2ekernel>
 %<latexrelease>\IncludeInRelease{2020-10-01}{\@if at DeclareRobustCommand}
@@ -2155,6 +2048,113 @@
 % \end{macro}
 %
 %
+% \subsubsection{Showing environments}
+%
+% \begin{macro}{\ShowEnvironment}
+% \changes{v1.5s}{2022/11/24}{Added \cs{ShowEnvironment}}
+%
+%    \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2023-06-01}{\ShowEnvironment}
+%<latexrelease>  {Add \ShowEnvironment}%
+%<*2ekernel|latexrelease>
+%    \end{macrocode}
+%
+%   \cs{ShowEnvironment} is quite similar to \cs{ShowCommand}.  We will
+%   pass the environment \meta{env} around as the macro
+%   \cs[no-index]{env}, because \cs{robust at command@act} expects a single
+%   token.
+%    \begin{macrocode}
+\def\ShowEnvironment#1{%
+  \expandafter\@show at environment\csname #1\endcsname}
+\long\def\@show at environment#1{%
+  \robust at command@act
+    \@showenvironmentlisthook#1%
+    \@show at normalenv#1}
+%    \end{macrocode}
+%
+% \begin{macro}{\@showenvironmentlisthook}
+%   This is similar to \cs{@showcommandlisthook}, but uses the dedicated
+%   versions for environments.
+%    \begin{macrocode}
+\def\@showenvironmentlisthook{%
+  {\@if at DeclareRobustCommand \@show at DeclareRobustCommand@env}%
+  {\@if at newcommand \@show at newcommand@env}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@show at newcommand@env}
+% \begin{macro}{\@show at DeclareRobustCommand@env}
+%   These are similar to the command versions below, except they say
+%   \enquote{environment} and call \cs{@show at environment@end} to print
+%   the \cs{end} part.
+%    \begin{macrocode}
+\long\def\@show at newcommand@env#1{%
+  \typeout{> \string\begin{\@expl at cs@to at str@@N#1}=environment:}%
+  \typeout{->\@expl at cs@replacement at spec@@N#1.^^J}%
+  \expandafter\@show at newcommand@aux
+    \csname\@backslashchar\@expl at cs@to at str@@N#1\expandafter\endcsname
+    \expandafter{#1}%
+  \@show at environment@end#1}
+\long\def\@show at DeclareRobustCommand@env#1{%
+  \typeout{> \string\begin{\@expl at cs@to at str@@N#1}=environment:}%
+  \typeout{->\@expl at cs@replacement at spec@@N#1.^^J}%
+  \expandafter\show at kernel@robust at command
+    \csname\@expl at cs@to at str@@N#1 \endcsname
+  \@show at environment@end#1}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@show at normalenv}
+% \begin{macro}{\@show at environment@end}
+%   A \enquote{normal} environment is straightforward.
+%   \cs{@show at environment@end} needs to check if the \cs{end} part is
+%   defined and show it accordingly, otherwise the output would show
+%   gibberish.
+%    \begin{macrocode}
+\long\def\@show at normalenv#1{%
+  \@show at normalenv@meaning#1%
+    {\string\begin{\@expl at cs@to at str@@N#1}=environment}%
+  \@show at environment@end#1}
+\long\def\@show at environment@end#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}
+% \end{macro}
+%
+% \begin{macro}{\@show at normalenv@meaning}
+% \begin{macro}{\@show at normalenv@undefined}
+%   And here the auxiliaries that do the actual printing.
+%    \begin{macrocode}
+\def\@show at normalenv@meaning#1#2{%
+  \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}
+% \end{macro}
+% \end{macro}
+%
+%   Now the rollback code.
+%    \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\ShowEnvironment}
+%<latexrelease>  {Undefine \ShowEnvironment}%
+%<latexrelease>\let\ShowEnvironment\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
+% \end{macro}
+%
+%
 % \subsection{Internal defining commands}
 %
 % These commands are used internally to define other \LaTeX{}





More information about the latex3-commits mailing list.