[latex3-commits] [git/LaTeX3-latex3-latex3] color-multi-model: Store all data for \color_set_eq:nn (4b62a80cd)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Jun 16 10:40:02 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : color-multi-model
Link       : https://github.com/latex3/latex3/commit/4b62a80cdf9965c340f552dd0c7c8661e785aae6

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

commit 4b62a80cdf9965c340f552dd0c7c8661e785aae6
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Jun 16 09:39:24 2020 +0100

    Store all data for \color_set_eq:nn


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

4b62a80cdf9965c340f552dd0c7c8661e785aae6
 l3experimental/l3color/l3color.dtx                    | 14 ++++++++++++--
 l3experimental/l3color/testfiles/m3color001.ptex.tlg  |  1 +
 l3experimental/l3color/testfiles/m3color001.tlg       |  1 +
 l3experimental/l3color/testfiles/m3color001.uptex.tlg |  1 +
 l3experimental/l3color/testfiles/m3color001.xetex.tlg |  1 +
 5 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index 3529fd6b8..e5388cde3 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -1012,14 +1012,24 @@
     \@@_if_defined:nTF {#2}
       {
         \tl_clear_new:c { l_@@_named_ #1 _tl }
+        \prop_clear_new:c { l_@@_named_ #1 _prop }
         \str_if_eq:nnTF {#2} { . }
-          { \tl_set_eq:cN { l_@@_named_ #1 _tl } \l_@@_current_tl }
-          { \tl_set_eq:cc { l_@@_named_ #1 _tl } { l_@@_named_ #2 _tl } }
+          {
+            \tl_set_eq:cN { l_@@_named_ #1 _tl } \l_@@_current_tl
+            \prop_put:cxx { l_@@_named_ #1 _prop }
+              { \exp_after:wN \use_i:nn  \l_@@_current_tl }
+              { \exp_after:wN \use_ii:nn \l_@@_current_tl }
+          }
+          {
+            \tl_set_eq:cc { l_@@_named_ #1 _tl } { l_@@_named_ #2 _tl }
+            \prop_set_eq:cc { l_@@_named_ #1 _prop } { l_@@_named_ #2 _prop }
+          }
       }
       {
         \__kernel_msg_error:nnn { color } { unknown-color } {#2}
       }
   }
+\cs_generate_variant:Nn \prop_put:Nnn { cxx }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3experimental/l3color/testfiles/m3color001.ptex.tlg b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
index 4cebd6bbe..a1169e8fe 100644
--- a/l3experimental/l3color/testfiles/m3color001.ptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
@@ -113,6 +113,7 @@ l. ...  }
 TEST 6: Copying the current color
 ============================================================
 Defining \l__color_named_foo_tl on line ...
+Defining \l__color_named_foo_prop on line ...
 The color foo has the properties:
 >  model  =>  cmyk
 >  value  =>  0.25 0.75 0 0.
diff --git a/l3experimental/l3color/testfiles/m3color001.tlg b/l3experimental/l3color/testfiles/m3color001.tlg
index ac124037d..cbcf0f09c 100644
--- a/l3experimental/l3color/testfiles/m3color001.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.tlg
@@ -113,6 +113,7 @@ l. ...  }
 TEST 6: Copying the current color
 ============================================================
 Defining \l__color_named_foo_tl on line ...
+Defining \l__color_named_foo_prop on line ...
 The color foo has the properties:
 >  model  =>  cmyk
 >  value  =>  0.25 0.75 0 0.
diff --git a/l3experimental/l3color/testfiles/m3color001.uptex.tlg b/l3experimental/l3color/testfiles/m3color001.uptex.tlg
index 4cebd6bbe..a1169e8fe 100644
--- a/l3experimental/l3color/testfiles/m3color001.uptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.uptex.tlg
@@ -113,6 +113,7 @@ l. ...  }
 TEST 6: Copying the current color
 ============================================================
 Defining \l__color_named_foo_tl on line ...
+Defining \l__color_named_foo_prop on line ...
 The color foo has the properties:
 >  model  =>  cmyk
 >  value  =>  0.25 0.75 0 0.
diff --git a/l3experimental/l3color/testfiles/m3color001.xetex.tlg b/l3experimental/l3color/testfiles/m3color001.xetex.tlg
index de9eb992a..46a78ad98 100644
--- a/l3experimental/l3color/testfiles/m3color001.xetex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.xetex.tlg
@@ -113,6 +113,7 @@ l. ...  }
 TEST 6: Copying the current color
 ============================================================
 Defining \l__color_named_foo_tl on line ...
+Defining \l__color_named_foo_prop on line ...
 The color foo has the properties:
 >  model  =>  cmyk
 >  value  =>  0.25 0.75 0 0.





More information about the latex3-commits mailing list.