[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Supporting all sorts of time travel (7e0a61f9)

PhelypeOleinik phelype.oleinik at latex-project.org
Mon Mar 22 02:42:45 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/7e0a61f9a52ed26ed38974242e8dcc0ed27e1c7c

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

commit 7e0a61f9a52ed26ed38974242e8dcc0ed27e1c7c
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sun Mar 21 22:42:45 2021 -0300

    Supporting all sorts of time travel
    
    This should be called tardis.sty


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

7e0a61f9a52ed26ed38974242e8dcc0ed27e1c7c
 base/latexrelease.dtx | 9 ++++++++-
 base/ltcmd.dtx        | 2 ++
 base/lthooks.dtx      | 2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/base/latexrelease.dtx b/base/latexrelease.dtx
index 49cfc559..6a33d6dc 100644
--- a/base/latexrelease.dtx
+++ b/base/latexrelease.dtx
@@ -416,6 +416,7 @@
 % be used in the \LaTeX{} kernel, taking \pkg{lthooks} as example:
 % \begin{verbatim}
 % %<*2ekernel|latexrelease>
+% %<latexrelease>\@ifundefined{ExplSyntaxOn}{}
 % \ExplSyntaxOn
 % %<latexrelease>\NewModuleRelease{lthooks}{2020/10/01}
 % \NewDocumentCommand \NewHook { m }
@@ -434,6 +435,7 @@
 % %<latexrelease>\cs_undefine:N \NewHook
 % %<latexrelease>\cs_undefine:N \AddToHook
 % %<latexrelease>\EndModuleRelease
+% %<latexrelease>\@ifundefined{ExplSyntaxOff}{}
 % \ExplSyntaxOff
 % %</2ekernel|latexrelease>
 % \end{verbatim}
@@ -452,7 +454,12 @@
 % \cs{ExplSyntaxOff} were added \emph{outside} the module code, because,
 % as discussed above, sometimes the code outside \cs{IncludeInRelease}
 % guards may be skipped, but not the code inside them, and in that case
-% the catcodes would be wrong when defining the code.
+% the catcodes would be wrong when defining the code.  Furthermore,
+% their existence needs to be checked (see the \cs{@ifundefined} lines
+% above them) when in \pkg{latexrelease} mode, in case a new
+% \file{latexrelease.sty} is being used in a pre-2020-02-02 release to
+% roll back/forth to a date also before 2020-02-02 (when \pkg{expl3} was
+% included in the kernel).
 %
 % \section{fixltx2e}
 %
diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index c04b94b4..f2239c16 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -87,6 +87,7 @@
 %<*2ekernel|latexrelease>
 %<latexrelease>\edef\@latexrelease at catcode@null{\the\catcode`\^^@ }
 %<latexrelease>\catcode`\^^@=12
+%<latexrelease>\@ifundefined{ExplSyntaxOn}{}
 \ExplSyntaxOn
 %<latexrelease>\NewModuleRelease{ltcmd}{2020/10/01}%
 %    \end{macrocode}
@@ -4012,6 +4013,7 @@
 %<latexrelease>
 %<latexrelease>\EndModuleRelease
 %<latexrelease>\cs_if_exist_use:N \latexrelease at postexpl
+%<latexrelease>\@ifundefined{ExplSyntaxOff}{}
 \ExplSyntaxOff
 %<latexrelease>\catcode`\^^@=\@latexrelease at catcode@null\relax
 %</2ekernel|latexrelease>
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 1e1d9200..eec3d83d 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -1716,6 +1716,7 @@
 %         {Use \cs{NewModuleRelease}.}
 %    \begin{macrocode}
 %<*2ekernel|latexrelease>
+%<latexrelease>\@ifundefined{ExplSyntaxOn}{}
 \ExplSyntaxOn
 %<latexrelease>\NewModuleRelease{lthooks}{2020/10/01}
 %    \end{macrocode}
@@ -4504,6 +4505,7 @@
 %<latexrelease>\long\def \IfHookEmptyTF #1#2#3{#2}
 %<latexrelease>
 %<latexrelease>\EndModuleRelease
+%<latexrelease>\@ifundefined{ExplSyntaxOff}{}
 \ExplSyntaxOff
 %</2ekernel|latexrelease>
 %    \end{macrocode}





More information about the latex3-commits mailing list.