[latex3-commits] [git/LaTeX3-latex3-latex3] master: Further tidy-up of color stack initialisation (7fd9ad56f)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jan 17 16:20:18 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/7fd9ad56ffcee37230e34e73d8b20182108ef8aa

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

commit 7fd9ad56ffcee37230e34e73d8b20182108ef8aa
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jan 17 11:51:42 2021 +0000

    Further tidy-up of color stack initialisation


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

7fd9ad56ffcee37230e34e73d8b20182108ef8aa
 l3backend/l3backend-color.dtx           | 63 +++++++++++++++++++--------------
 l3kernel/testfiles/m3expl001.luatex.tlg |  4 +--
 l3kernel/testfiles/m3expl001.tlg        |  4 +--
 l3kernel/testfiles/m3expl001.xetex.tlg  |  2 +-
 l3kernel/testfiles/m3expl003.luatex.tlg |  4 +--
 l3kernel/testfiles/m3expl003.tlg        |  4 +--
 l3kernel/testfiles/m3expl003.xetex.tlg  |  2 +-
 7 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 29cdda79b..724b13ede 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -173,7 +173,7 @@
 % state generally. The exact form depends on the engine, and for
 % \texttt{dvipdfmx}/\XeTeX{} the backend version.
 %
-% \subsubsection{\LuaTeX{} and \pdfTeX{}}
+% \subsubsection{Common code}
 %
 %    \begin{macrocode}
 %<*dvipdfmx|luatex|pdftex|xetex>
@@ -187,32 +187,6 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}
-%   {
-%     \@@_backend_select_cmyk:n ,
-%     \@@_backend_select_gray:n ,
-%     \@@_backend_select_rgb:n
-%   }
-% \begin{macro}{\@@_backend_reset:}
-%   Simply dump the data, but allowing for \LuaTeX{}.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
-  { \@@_backend_select:n { #1 ~ k ~ #1 ~ K } }
-\cs_new_protected:Npn \@@_backend_select_gray:n #1
-  { \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
-\cs_new_protected:Npn \@@_backend_select_rgb:n #1
-  { \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
-\cs_new_protected:Npn \@@_backend_select:n #1
-  {
-    \@@_backend_stack_push:nn \l_@@_backend_stack_int {#1}
-    \group_insert_after:N \@@_backend_reset:
-  }
-\cs_new_protected:Npn \@@_backend_reset:
-  { \@@_backend_stack_pop:n \l_@@_backend_stack_int }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
 %    \begin{macrocode}
 %</dvipdfmx|luatex|pdftex|xetex>
 %    \end{macrocode}
@@ -404,6 +378,41 @@
 %</dvips|dvisvgm>
 %    \end{macrocode}
 %
+% \subsubsection{\LuaTeX{} and \pdfTeX{}}
+%
+%    \begin{macrocode}
+%<*dvipdfmx|luatex|pdftex|xetex>
+%    \end{macrocode}
+%
+% \begin{macro}
+%   {
+%     \@@_backend_select_cmyk:n ,
+%     \@@_backend_select_gray:n ,
+%     \@@_backend_select_rgb:n
+%   }
+% \begin{macro}{\@@_backend_reset:}
+%   Simply dump the data, but allowing for \LuaTeX{}.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
+  { \@@_backend_select:n { #1 ~ k ~ #1 ~ K } }
+\cs_new_protected:Npn \@@_backend_select_gray:n #1
+  { \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
+\cs_new_protected:Npn \@@_backend_select_rgb:n #1
+  { \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
+\cs_new_protected:Npn \@@_backend_select:n #1
+  {
+    \@@_backend_stack_push:nn \l_@@_backend_stack_int {#1}
+    \group_insert_after:N \@@_backend_reset:
+  }
+\cs_new_protected:Npn \@@_backend_reset:
+  { \@@_backend_stack_pop:n \l_@@_backend_stack_int }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%    \begin{macrocode}
+%</dvipdfmx|luatex|pdftex|xetex>
+%    \end{macrocode}
 %
 % \subsubsection{\texttt{dvipmdfx}/\XeTeX{}}
 %
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 2e97f29e5..6638bb85c 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -28,12 +28,12 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
 Defining \__kernel_backend_matrix:x on line ...
 Defining \__color_backend_pickup:N on line ...
+Defining \l__color_backend_stack_int on line ...
+\l__color_backend_stack_int=\count...
 Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_stack_push:nn on line ...
 Defining \__color_backend_stack_push:nx on line ...
 Defining \__color_backend_stack_pop:n on line ...
-Defining \l__color_backend_stack_int on line ...
-\l__color_backend_stack_int=\count...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 353bcac70..fe556a964 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -28,12 +28,12 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
 Defining \__kernel_backend_matrix:x on line ...
 Defining \__color_backend_pickup:N on line ...
+Defining \l__color_backend_stack_int on line ...
+\l__color_backend_stack_int=\count...
 Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_stack_push:nn on line ...
 Defining \__color_backend_stack_push:nx on line ...
 Defining \__color_backend_stack_pop:n on line ...
-Defining \l__color_backend_stack_int on line ...
-\l__color_backend_stack_int=\count...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 24f9c5a0f..a63523b47 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -29,9 +29,9 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \c__kernel_sys_dvipdfmx_version_int on line ...
 \c__kernel_sys_dvipdfmx_version_int=\count...
 Defining \__color_backend_pickup:N on line ...
-Defining \__color_backend_stack_init:Nnn on line ...
 Defining \l__color_backend_stack_int on line ...
 \l__color_backend_stack_int=\count...
+Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 2e97f29e5..6638bb85c 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -28,12 +28,12 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
 Defining \__kernel_backend_matrix:x on line ...
 Defining \__color_backend_pickup:N on line ...
+Defining \l__color_backend_stack_int on line ...
+\l__color_backend_stack_int=\count...
 Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_stack_push:nn on line ...
 Defining \__color_backend_stack_push:nx on line ...
 Defining \__color_backend_stack_pop:n on line ...
-Defining \l__color_backend_stack_int on line ...
-\l__color_backend_stack_int=\count...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 353bcac70..fe556a964 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -28,12 +28,12 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
 Defining \__kernel_backend_matrix:x on line ...
 Defining \__color_backend_pickup:N on line ...
+Defining \l__color_backend_stack_int on line ...
+\l__color_backend_stack_int=\count...
 Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_stack_push:nn on line ...
 Defining \__color_backend_stack_push:nx on line ...
 Defining \__color_backend_stack_pop:n on line ...
-Defining \l__color_backend_stack_int on line ...
-\l__color_backend_stack_int=\count...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 24f9c5a0f..a63523b47 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -29,9 +29,9 @@ Defining \__kernel_backend_scope_end: on line ...
 Defining \c__kernel_sys_dvipdfmx_version_int on line ...
 \c__kernel_sys_dvipdfmx_version_int=\count...
 Defining \__color_backend_pickup:N on line ...
-Defining \__color_backend_stack_init:Nnn on line ...
 Defining \l__color_backend_stack_int on line ...
 \l__color_backend_stack_int=\count...
+Defining \__color_backend_stack_init:Nnn on line ...
 Defining \__color_backend_select_cmyk:n on line ...
 Defining \__color_backend_select_gray:n on line ...
 Defining \__color_backend_select_rgb:n on line ...





More information about the latex3-commits mailing list.