[latex3-commits] [git/LaTeX3-latex3-latex2e] cmd: Revert "Simplify loading (expl3.ltx already checks for reload)" (f714b488)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Jan 23 02:25:19 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : cmd
Link       : https://github.com/latex3/latex2e/commit/f714b48808f79c1721680a01f744bf758619ad4e

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

commit f714b48808f79c1721680a01f744bf758619ad4e
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Jan 22 22:25:19 2021 -0300

    Revert "Simplify loading (expl3.ltx already checks for reload)"
    
    This reverts commit a39efc0a80693893ca16b3cc09484d0ac0d2f7e7.


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

f714b48808f79c1721680a01f744bf758619ad4e
 base/ltexpl.dtx | 80 +++++++++++++++++++++++++++++++--------------------------
 1 file changed, 43 insertions(+), 37 deletions(-)

diff --git a/base/ltexpl.dtx b/base/ltexpl.dtx
index 6df18f1e..8731f82f 100644
--- a/base/ltexpl.dtx
+++ b/base/ltexpl.dtx
@@ -153,25 +153,36 @@
 %</2ekernel>
 %    \end{macrocode}
 %
+%    If we are doing a rollback with a format containing expl3 we
+%    aren't reloading it as that creates havoc. This may need a
+%    refined version!
 %    \begin{macrocode}
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2021/05/01}%
 %<latexrelease>                 {expl3}{Pre-load expl3}%
+\expandafter\ifx\csname tex\string _let:D\endcsname\relax
+  \expandafter\@firstofone
+\else
+  \GenericInfo{}{Skipping: expl3 code already part of the format}%
+%<2ekernel>  \expandafter\endinput
+%<latexrelease>  \expandafter\@gobble
+\fi
 %    \end{macrocode}
 %
 %  Check for the required primitive/engine support and the existence of
 %  a loader.
 %    \begin{macrocode}
-\IfFileExists{expl3.ltx}
   {%
-    \ifnum0%
-      \ifdefined\pdffilesize 1\fi
-      \ifdefined\filesize 1\fi
-      \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
-      \ifdefined\kanjiskip 1\fi
-        >0 %
-      \expandafter\@firstofone
-    \else
+    \IfFileExists{expl3.ltx}
+      {%
+        \ifnum0%
+          \ifdefined\pdffilesize 1\fi
+          \ifdefined\filesize 1\fi
+          \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+          \ifdefined\kanjiskip 1\fi
+            >0 %
+          \expandafter\@firstofone
+        \else
 %    \end{macrocode}
 %
 % In \texttt{2ekernel} mode, an error is fatal and building the format
@@ -187,21 +198,21 @@
 %<2ekernel>          \def~{ }\def\MessageBreak{^^J~~~~~~~~~~~~~~~}%
 %<2ekernel>          \errmessage{LaTeX Error:
 %<latexrelease>          \@latex at error{%
-        LaTeX requires the e-TeX primitives and additional\MessageBreak
-        functionality available in the engines:\MessageBreak
-          - pdfTeX v1.40\MessageBreak
-          - XeTeX v0.99992\MessageBreak
-          - LuaTeX v0.95\MessageBreak
-          - e-(u)pTeX mid-2012\MessageBreak
-        or later%
+            LaTeX requires the e-TeX primitives and additional\MessageBreak
+            functionality available in the engines:\MessageBreak
+              - pdfTeX v1.40\MessageBreak
+              - XeTeX v0.99992\MessageBreak
+              - LuaTeX v0.95\MessageBreak
+              - e-(u)pTeX mid-2012\MessageBreak
+            or later%
 %<latexrelease>          }\@ehd \expandafter\@gobble
 %<2ekernel>          }\batchmode \read -1 to \reserved at a
-    \fi
-  }
-  {%
+        \fi
+      }
+      {%
 %<*2ekernel>
-    \errmessage{LaTeX requires expl3}%
-    \batchmode \read -1 to \reserved at a
+        \errmessage{LaTeX requires expl3}%
+        \batchmode \read -1 to \reserved at a
 %</2ekernel>
 %    \end{macrocode}
 %    We do not support a roll forward across 2019. You need to start
@@ -209,23 +220,18 @@
 % \changes{v1.2g}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 %<*latexrelease>
-    \@latex at warning@no at line
-      {You need a format that already contains a recent\MessageBreak
-       expl3 as part of the kernel, e.g. at least a kernel\MessageBreak
-       from 2019 to roll forward to that date!\MessageBreak
-       --- I'm giving up!\MessageBreak\MessageBreak
-       Note that manually loading the expl3 package\MessageBreak
-       from your distribution is not enough}%
-    \batchmode \read -1 to \reserved at a
+        \@latex at warning@no at line
+          {You need a format that already contains a recent\MessageBreak
+           expl3 as part of the kernel, e.g. at least a kernel\MessageBreak
+           from 2019 to roll forward to that date!\MessageBreak
+           --- I'm giving up!\MessageBreak\MessageBreak
+           Note that manually loading the expl3 package\MessageBreak
+           from your distribution is not enough}%
+        \batchmode \read -1 to \reserved at a
 %</latexrelease>
-  }%
-%    \end{macrocode}
-%   The code above checks if \texttt{expl3.ltx} exists and can be
-%   loaded, and if so uses \cs{input} below.  \texttt{expl3.ltx} does
-%   the right thing if being reloaded, so here we don't worry about that
-%   (otherwise it would be a problem in \texttt{latexrelease} mode).
-%    \begin{macrocode}
-  {\input expl3.ltx }%
+      }%
+      {\input expl3.ltx }%
+  }
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>
 %    \end{macrocode}





More information about the latex3-commits mailing list.