[latex3-commits] [git/LaTeX3-latex3-latex3] LaTeX2020: Load config files with correct catcodes in all cases (4f25fd9aa)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Oct 3 20:07:13 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : LaTeX2020
Link : https://github.com/latex3/latex3/commit/4f25fd9aa4dfd0e0ecb8cf67759fc26fe4120b07
>---------------------------------------------------------------
commit 4f25fd9aa4dfd0e0ecb8cf67759fc26fe4120b07
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Oct 3 19:07:13 2019 +0100
Load config files with correct catcodes in all cases
>---------------------------------------------------------------
4f25fd9aa4dfd0e0ecb8cf67759fc26fe4120b07
l3kernel/expl3.dtx | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index 2e989f7ea..958549e96 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -1251,11 +1251,30 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\__kernel_sys_configuration_load:n}
-% For \LaTeXe{}, option loading uses the built-in functionality: as this
-% may be a reload we have to force the issue.
+% \begin{macro}
+% {\__kernel_sys_configuration_load:n,\__kernel_sys_configuration_load_std:n}
+% To load configurations, we have the following cases
+% \begin{itemize}
+% \item \pkg{expl3} is pre-loaded: by the time any configuration loads,
+% we have the full file loading stack, and only need the standard
+% version of the code here.
+% \item The package is loaded with pre-loading: we again use the standard
+% version, but we don't test just yet.
+% \item The package is used without pre-loaded code: we need to manually
+% manage \pkg{expl3} syntax.
+% \end{itemize}
% \begin{macrocode}
\cs_gset_protected:Npn \__kernel_sys_configuration_load:n #1
+%<*!2ekernel>
+ {
+ \ExplSyntaxOff
+ \cs_undefine:c { ver@ #1 .def }
+ \@onefilewithoptions {#1} [ ] [ ]
+ \c_@@_def_ext_tl
+ \ExplSyntaxOn
+ }
+\cs_gset_protected:Npn \__kernel_sys_configuration_load_std:n #1
+%</!2ekernel>
{
\cs_undefine:c { ver@ #1 .def }
\@onefilewithoptions {#1} [ ] [ ]
@@ -1324,7 +1343,11 @@
% \begin{macrocode}
%<*!2ekernel>
\cs_if_exist:NT \@pushfilenameaux
- { \endinput }
+ {
+ \cs_gset_eq:NN \__kernel_sys_configuration_load:n
+ \__kernel_sys_configuration_load_std:n
+ \endinput
+ }
%</!2ekernel>
% \end{macrocode}
%
@@ -1394,6 +1417,14 @@
% \end{macrocode}
% \end{variable}
%
+% Tidy up configuration loading, as promised.
+% \begin{macrocode}
+%<*!2ekernel>
+\cs_gset_eq:NN \__kernel_sys_configuration_load:n
+ \__kernel_sys_configuration_load_std:n
+%</!2ekernel>
+% \end{macrocode}
+%
% For pre-loading, we have to manually disable the syntax.
% \begin{macrocode}
%<*2ekernel>
More information about the latex3-commits
mailing list