[latex3-commits] [git/LaTeX3-latex3-latex3] LaTeX2020: Move global opt detection to last-minute code (8376d9506)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Oct 8 17:56:42 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : LaTeX2020
Link       : https://github.com/latex3/latex3/commit/8376d950604de0c9d47eee3a154e8c32280b35ca

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

commit 8376d950604de0c9d47eee3a154e8c32280b35ca
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Oct 8 16:56:42 2019 +0100

    Move global opt detection to last-minute code


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

8376d950604de0c9d47eee3a154e8c32280b35ca
 l3kernel/expl3.dtx | 28 ----------------------------
 l3kernel/l3sys.dtx | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index af8a57106..19bdd949f 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -1240,34 +1240,6 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%<@@=sys>
-%    \end{macrocode}
-%
-% If there is a class option set, and recognised, we pick it up: these
-% will over-ride anything set automatically but will themsevles be
-% over-written if there is a package option.
-%    \begin{macrocode}
-\cs_if_exist:NT \@classoptionslist
-  {
-    \cs_if_eq:NNF \@classoptionslist \scan_stop:
-      {
-        \clist_map_inline:Nn \@classoptionslist
-          {
-            \str_case:nnT {#1}
-              {
-                { dvipdfmx } { \tl_gset:Nn \g_@@_backend_tl { dvipdfmx } }
-                { dvips }    { \tl_gset:Nn \g_@@_backend_tl { dvips } }
-                { dvisvgm }  { \tl_gset:Nn \g_@@_backend_tl { dvisvgm } }
-                { pdftex }   { \tl_gset:Nn \g_@@_backend_tl { pdfmode } }
-                { xetex }    { \tl_gset:Nn \g_@@_backend_tl { xdvipdfmx } }
-              }
-              { \clist_remove_all:Nn \@unusedoptionlist {#1} }
-          }
-      }
-  }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 %<@@=expl>
 %    \end{macrocode}
 %
diff --git a/l3kernel/l3sys.dtx b/l3kernel/l3sys.dtx
index 10d719a5b..c9c538466 100644
--- a/l3kernel/l3sys.dtx
+++ b/l3kernel/l3sys.dtx
@@ -806,6 +806,38 @@
 %
 % \subsubsection{Configurations}
 %
+% If there is a class option set, and recognised, we pick it up: these
+% will over-ride anything set automatically but will themsevles be
+% over-written if there is a package option.
+%    \begin{macrocode}
+\@@_finalise:n
+  {
+    \cs_if_exist:NT \@classoptionslist
+      {
+        \cs_if_eq:NNF \@classoptionslist \scan_stop:
+          {
+            \clist_map_inline:Nn \@classoptionslist
+              {
+                \str_case:nnT {#1}
+                  {
+                    { dvipdfmx }
+                      { \tl_gset:Nn \g_@@_backend_tl { dvipdfmx } }
+                    { dvips }
+                      { \tl_gset:Nn \g_@@_backend_tl { dvips } }
+                    { dvisvgm }
+                      { \tl_gset:Nn \g_@@_backend_tl { dvisvgm } }
+                    { pdftex }
+                      { \tl_gset:Nn \g_@@_backend_tl { pdfmode } }
+                    { xetex }
+                      { \tl_gset:Nn \g_@@_backend_tl { xdvipdfmx } }
+                  }
+                  { \clist_remove_all:Nn \@unusedoptionlist {#1} }
+              }
+          }
+      }
+  }
+%    \end{macrocode}
+%
 % \begin{variable}{\g_@@_backend_tl}
 %   As the backend has to be checked and possibly adjusted, the approach here
 %   is to create a variable and use that in a one-shot to set a constant.





More information about the latex3-commits mailing list