[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Add \NewModuleRelease from mailed test (624714b7)
PhelypeOleinik
phelype.oleinik at latex-project.org
Wed Mar 10 20:02:48 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : gh479
Link : https://github.com/latex3/latex2e/commit/624714b7efba97b6fa6faf53b514280b8e92a1f3
>---------------------------------------------------------------
commit 624714b7efba97b6fa6faf53b514280b8e92a1f3
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Wed Mar 10 16:02:48 2021 -0300
Add \NewModuleRelease from mailed test
>---------------------------------------------------------------
624714b7efba97b6fa6faf53b514280b8e92a1f3
base/ltvers.dtx | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 68 insertions(+), 2 deletions(-)
diff --git a/base/ltvers.dtx b/base/ltvers.dtx
index 26eaee98..f73b5d69 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2021/01/15 v1.1e LaTeX Kernel (Version Info)]
+ [2021/03/10 v1.1f LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
@@ -214,6 +214,11 @@
% \end{macrocode}
%
% \begin{macro}{\IncludeInRelease}
+% \begin{macro}{\EndIncludeInRelease}
+% \begin{macro}{\@IncludeInRelease}
+% \begin{macro}{\@IncludeInRele at se}
+% \begin{macro}{\@gobble at IncludeInRelease}
+% \begin{macro}{\@check at IncludeInRelease}
% \changes{v1.0w}{2015/02/21}
% {set \cs{@currname} empty here (in case \cs{IncludeInRelease} input early)}
% \begin{macrocode}
@@ -224,6 +229,7 @@
% \changes{v1.0m}{2015/01/17}{modified with \cs{@currname}}
% \changes{v1.0o}{2015/01/19}{Optional argument}
% \changes{v1.0q}{2015/02/19}{Swap argument order}
+% \changes{v1.1f}{2021/03/10}{Add support for usage in \cs{NewModuleRelease}}
%
% \begin{macrocode}
%<*2ekernel|latexrelease>
@@ -237,6 +243,10 @@
{There is an \string\EndIncludeRelease\space missing}%
\@includeinreleasefalse
\fi
+ \ifx\EndModuleRelease#1%
+ \expandafter\EndModuleRelease
+ \expandafter\@gobblefour
+ \fi
\kernel at ifnextchar[%
{\@IncludeInRelease{#1}}
{\@IncludeInRelease{#1}[#1]}}
@@ -282,6 +292,9 @@
\@includeinreleasefalse
\else
\PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}%
+\fi
+\if at skipping@module
+ \expandafter\new at module@skip
\fi}
% \end{macrocode}
%
@@ -296,13 +309,66 @@
#2#3\@end at check@IncludeInRelease{%
\ifx\@check at IncludeInRelease#2\else
\PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}%
+ \fi
+\if at skipping@module
+ \expandafter\new at module@skip
+\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Declaring an all-new module}
+%
+% \begin{macro}{\if at skipping@module}
+% \begin{macro}{\NewModuleRelease}
+% \begin{macro}{\EndModuleRelease}
+% \begin{macro}{\new at module@skip}
+% \begin{macro}{\new at modulename}
+% \begin{macro}{\new at moduledate}
+%
+% When we have a whole new module, we can't roll back to a date where
+% such module exists, otherwise hundreds of \enquote{command already
+% defined} errors will pop up. But we can't skip it altogether
+% either, because the module might have changes we still want applied,
+% so a more detailed cherry-picking of code chunks have to be done.
+%
+%
+% \changes{v1.0f}{2021/03/10}{Added \cs{NewModuleRelease}.}
+% \begin{macrocode}
+\newif\if at skipping@module
+\def\NewModuleRelease#1#2{%
+ \edef\new at modulename{#1}%
+ \edef\new at moduledate{#2}%
+ \GenericInfo{}{BEGIN module: \new at modulename\space (\new at moduledate)}%
+ \ifnum\sourceLaTeXdate<
+ \expandafter\@parse at version\new at moduledate//00\@nil\relax
+ \@skipping at modulefalse
+ \else
+ \@skipping at moduletrue
+ \expandafter\new at module@skip
\fi}
+\long\def\new at module@skip#1\IncludeInRelease{\IncludeInRelease}
+\def\EndModuleRelease{%
+ \GenericInfo{}{END module: \new at modulename\space (\new at moduledate)}%
+ \let\new at modulename\@empty
+ \let\new at moduledate\@empty
+ \@skipping at modulefalse}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</2ekernel|latexrelease>
% \end{macrocode}
-% \end{macro}
+%
% \Finale
%
\endinput
More information about the latex3-commits
mailing list.