[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correctly initialise primitives when loaded earlier (791b7a4d3)
PhelypeOleinik
tex.phelype at gmail.com
Fri Jul 10 21:33:37 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/791b7a4d36cbb4d4ad4563686805cc213133d810
>---------------------------------------------------------------
commit 791b7a4d36cbb4d4ad4563686805cc213133d810
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date: Fri Jul 10 16:33:37 2020 -0300
Correctly initialise primitives when loaded earlier
>---------------------------------------------------------------
791b7a4d36cbb4d4ad4563686805cc213133d810
l3kernel/l3names.dtx | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/l3kernel/l3names.dtx b/l3kernel/l3names.dtx
index 9e9068e5d..005166cab 100644
--- a/l3kernel/l3names.dtx
+++ b/l3kernel/l3names.dtx
@@ -1209,15 +1209,26 @@
% \end{macrocode}
%
% \LaTeXe{} moves a few primitives, so these are sorted out.
-% A convenient test for \LaTeXe{} is the \cs{@@@@end} saved primitive.
+% In newer versions of \LaTeXe{}, \pkg{expl3} is loaded rather early, so
+% only some primitives are already renamed, so we need two tests here.
+% At the beginning of the \LaTeXe{} format, the primitives \tn{end} and
+% \tn{input} are renamed, and only later on the other ones.
% \begin{macrocode}
%<*package>
\tex_ifdefined:D \@@@@end
\tex_let:D \tex_end:D \@@@@end
+ \tex_let:D \tex_input:D \@@@@input
+\tex_fi:D
+% \end{macrocode}
+%
+% If \tn{@@@@hyph} is defined, we are loading \pkg{expl3} in a
+% pre-2020/10/01 release of \LaTeXe{}, so a few other primitives have to
+% be tested as well.
+% \begin{macrocode}
+\tex_ifdefined:D \@@@@hyph
\tex_let:D \tex_everydisplay:D \frozen at everydisplay
\tex_let:D \tex_everymath:D \frozen at everymath
\tex_let:D \tex_hyphen:D \@@@@hyph
- \tex_let:D \tex_input:D \@@@@input
\tex_let:D \tex_italiccorrection:D \@@@@italiccorr
\tex_let:D \tex_underline:D \@@@@underline
% \end{macrocode}
More information about the latex3-commits
mailing list.