[latex3-commits] [git/LaTeX3-latex3-latex2e] gh504: Do not rollback expl3 file stack management (b181bb9d)

PhelypeOleinik phelype.oleinik at latex-project.org
Sun Mar 28 00:40:18 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh504
Link       : https://github.com/latex3/latex2e/commit/b181bb9da545c90b6336c0205d2eda900e94619d

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

commit b181bb9da545c90b6336c0205d2eda900e94619d
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sat Mar 27 20:40:18 2021 -0300

    Do not rollback expl3 file stack management
    
    Fixes #504


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

b181bb9da545c90b6336c0205d2eda900e94619d
 base/ltclass.dtx | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index aa0305a8..fa12e11b 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2021/03/05 v1.3z LaTeX Kernel (Class & Package Interface)]
+             [2021/03/27 v1.3aa LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -640,14 +640,38 @@
 %<latexrelease>    \@expl at push@filename at aux@@}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>
+%    \end{macrocode}
+%
+% When we roll back from a release that has \pkg{expl3} preloaded, the
+% definitions of \cs{@pushfilename} and \cs{@popfilename} can't be
+% completely rolled back otherwise \pkg{expl3}-based packages won't
+% have the automatic \cs{ExplSyntaxOff} at the end.  Here and below for
+% \cs{@popfilename}, we don't roll back all the way through if coming
+% from \LaTeX${}>2020-02-02$.
+% \changes{v1.3aa}{2021/03/27}
+%         {Do not completely roll back if \pkg{expl3} is loaded.}
+%    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{0000/00/00}{\@pushfilename}%
 %<latexrelease>  {Add \@expl at push@filename@@ and \@expl at push@filename at aux@@}%
+%<latexrelease>\ifnum\sourceLaTeXdate<20200202\relax
+%<latexrelease>  \GenericInfo{}{Defining 00-00-00\string\@pushfilename.}
 %<latexrelease>\def\@pushfilename{%
 %<latexrelease>  \xdef\@currnamestack{%
 %<latexrelease>    {\@currname}%
 %<latexrelease>    {\@currext}%
 %<latexrelease>    {\the\catcode`\@}%
 %<latexrelease>    \@currnamestack}}
+%<latexrelease>\else
+%<latexrelease>  \GenericInfo{}{Defining 2020-02-02\string\@pushfilename.}
+%<latexrelease>\def\@pushfilename{%
+%<latexrelease>  \@expl at push@filename@@
+%<latexrelease>  \xdef\@currnamestack{%
+%<latexrelease>    {\@currname}%
+%<latexrelease>    {\@currext}%
+%<latexrelease>    {\the\catcode`\@}%
+%<latexrelease>    \@currnamestack}%
+%<latexrelease>    \@expl at push@filename at aux@@}
+%<latexrelease>\fi
 %<latexrelease>\EndIncludeInRelease
 \@onlypreamble\@pushfilename
 %    \end{macrocode}
@@ -676,9 +700,21 @@
 %<latexrelease>  \@expl at pop@filename@@}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>
+%    \end{macrocode}
+%
+% \changes{v1.3aa}{2021/03/27}
+%         {Do not completely roll back if \pkg{expl3} is loaded.}
+%    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{0000/00/00}{\@popfilename}%
 %<latexrelease>  {Add \@expl at push@filename@@ and \@expl at push@filename at aux@@}%
+%<latexrelease>\ifnum\sourceLaTeXdate<20200202\relax
+%<latexrelease>  \GenericInfo{}{Defining 00-00-00\string\@popfilename.}
 %<latexrelease>\def\@popfilename{\expandafter\@p at pfilename\@currnamestack\@nil}
+%<latexrelease>\else
+%<latexrelease>  \GenericInfo{}{Defining 2020-02-02\string\@popfilename.}
+%<latexrelease>\def\@popfilename{\expandafter\@p at pfilename\@currnamestack\@nil
+%<latexrelease>  \@expl at pop@filename@@}
+%<latexrelease>\fi
 %<latexrelease>\EndIncludeInRelease
 \@onlypreamble\@popfilename
 %    \end{macrocode}





More information about the latex3-commits mailing list.