[latex3-commits] [git/LaTeX3-latex3-latex3] master: Special-case "none" colorant (78f1f9f6e)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Sep 16 23:33:37 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/78f1f9f6e3c4af8766f710df70d11c188a31af8e

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

commit 78f1f9f6e3c4af8766f710df70d11c188a31af8e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 16 22:33:37 2020 +0100

    Special-case "none" colorant


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

78f1f9f6e3c4af8766f710df70d11c188a31af8e
 l3experimental/l3color/l3color.dtx | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index e30d2a83b..a15ad3551 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -1918,12 +1918,20 @@
                }
           }
           {
-            \__kernel_msg_error:nnn { color }
-              { DeviceN-no-alternative }
-              {#2}
+            \str_if_eq:nnF {##1} { none }
+              {
+                \__kernel_msg_error:nnn { color }
+                  { DeviceN-no-alternative }
+                  {#2}
+              }
           }
       }
-    \exp_args:NV \@@_model_devicen:nnn \l_@@_model_tl {#1} {#2}
+    \tl_if_empty:NTF \l_@@_model_tl
+      {
+        \__kernel_msg_error:nnn { color }
+          { DeviceN-no-alternative } {#2}
+      }
+      { \exp_args:NV \@@_model_devicen:nnn \l_@@_model_tl {#1} {#2} }
   }
 %    \end{macrocode}
 %   We now complete the data we require by first finding out how many





More information about the latex3-commits mailing list.