[latex3-commits] [git/LaTeX3-latex3-latex3] luacolor: Remove duplicate code (464b5be2f)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jun 4 21:32:46 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : luacolor
Link       : https://github.com/latex3/latex3/commit/464b5be2fd5845dc1e0776b9cc74ffd33e93c007

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

commit 464b5be2fd5845dc1e0776b9cc74ffd33e93c007
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jun 4 20:32:46 2021 +0100

    Remove duplicate code


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

464b5be2fd5845dc1e0776b9cc74ffd33e93c007
 l3backend/l3backend-color.dtx | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 20863dace..cae8ceaaa 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -1385,47 +1385,6 @@ local node_types = {
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{node_map, node_types,literals}
-%   We abstract the idea of different types of node where it makes sense:
-%   notice for example that in contrast to \pkg{luacolor} we extract some
-%   one-off information in the function that needs it. We also use a single
-%   local \enquote{map} for the node values.
-%    \begin{macrocode}
-local node_map = {
-    list         = 1 ,
-    list_leaders = 2 ,
-    list_disc    = 3 ,
-    color        = 4 ,
-    no_color     = 5
-  }
-local node_types = {
-    [id("hlist")]   = node_map.list      ,
-    [id("vlist")]   = node_map.list      ,
-    [id("rule")]    = node_map.color     ,
-    [id("glyph")]   = node_map.color     ,
-    [id("disc")]    = node_map.list_disc ,
-    [id("whatsit")] = {
-        [subtype("pdf_colorstack")] =
-          function(n) return n.stack == 0 and node_map.no_color or nil end ,
-        [subtype("special")]     = node_map.color ,
-        [subtype("pdf_literal")] = node_map.color ,
-        [subtype("pdf_save")]    = node_map.color ,
-        [subtype("pdf_restore")] = node_map.color
-      } ,
-    [id("glue")] =
-      function(n)
-        if n.subtype >= 100 then
-          if n.leader.id == id("rule") then
-            return node_map.color
-          else
-            return node_map.list_leaders
-          end
-        end
-      end
-  }
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{get_type}
 %   Convert a node into the type, allowing for tables and functions.
 %    \begin{macrocode}





More information about the latex3-commits mailing list.