[latex3-commits] [git/LaTeX3-latex3-latex2e] color: Plan B (6a4fccc9)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jun 3 12:45:51 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : color
Link       : https://github.com/latex3/latex2e/commit/6a4fccc9345f5aac99cc1fab58d5657bce5a134a

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

commit 6a4fccc9345f5aac99cc1fab58d5657bce5a134a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jun 3 11:45:51 2020 +0100

    Plan B


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

6a4fccc9345f5aac99cc1fab58d5657bce5a134a
 required/graphics/color.dtx | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/required/graphics/color.dtx b/required/graphics/color.dtx
index 6a201cba..4470f62c 100644
--- a/required/graphics/color.dtx
+++ b/required/graphics/color.dtx
@@ -549,14 +549,11 @@
       {\PackageInfo{color}{Redefining color #1}}%
      \csname color@#2\expandafter\endcsname
          \csname\string\color @#1\endcsname{#3}}%
-    \ifcsname\detokenize{color_set:nnn}\endcsname
-      \csname\detokenize{color_set:nnn}\endcsname{#1}{#2}{#3}%
-    \fi
+    \@expl at color@set at nnn{#1}{#2}{#3}%
   }
 %    \end{macrocode}
 %  \end{macro}
 %
-%
 %  \begin{macro}{\DefineNamedColor}
 % \changes{v0.3d}{1994/09/29}
 %     {Macro added}
@@ -616,15 +613,26 @@
       {\@ifundefined{col@#2}{}%
         {\PackageInfo{color}{Redefining color #2 in named color model}}%
       \csname color@#3\endcsname\@tempa{#4}%
-    \ifcsname\detokenize{color_set:nnn}\endcsname
-      \csname\detokenize{color_set:nnn}\endcsname{#1}{#2}{#3}%
-    \fi
+    \@expl at color@set at nnn{#1}{#2}{#3}%
       \csname define at color@#1\endcsname{#2}\@tempa
       \c at lor@usename{#2}}}}
 \@onlypreamble\DefineNamedColor
 %    \end{macrocode}
 %  \end{macro}
 %
+%  \begin{macro}{\@expl at color@set at nnn}
+%    Abstracted support for sending data to \pkg{expl3}.
+%    \begin{macrocode}
+\protected\def\@expl at colo@set at nnn#1#2#3{}
+\ifdefined\ExplSyntaxOn
+  \ExplSyntaxOn
+    \cs_if_exist:NT \color_set:nnn
+      { \cs_gset_eq:NN \@expl at color@set at nnn \color_set:nnn }
+  \ExplSyntaxOff
+\fi
+%    \end{macrocode}
+%  \end{macro}
+%
 % \section{Colour Switch}
 %
 %  \begin{macro}{\ifcolors@}





More information about the latex3-commits mailing list.