]> gitweb.factorcode.org Git - factor.git/commitdiff
io.styles: change style-stream to inherit all styles by default.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Feb 2020 03:53:21 +0000 (19:53 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Feb 2020 05:47:01 +0000 (21:47 -0800)
basis/io/styles/styles.factor

index 31554ec9d480f7d9546dce5c5692417b0db42208..8373811a3a2a834f275d0decab9b898fa1161825 100644 (file)
@@ -61,12 +61,10 @@ C: <ignore-close-stream> ignore-close-stream
 TUPLE: style-stream < filter-writer style ;
 INSTANCE: style-stream output-stream
 
-DEFER: inherit-style
-
 <PRIVATE
 
 : nested-style ( style style-stream -- style stream )
-    [ style>> inherit-style ] [ stream>> ] bi ; inline
+    [ style>> swap assoc-union ] [ stream>> ] bi ; inline
 
 PRIVATE>
 
@@ -149,18 +147,6 @@ CONSTANT: standard-table-style
         { table-border T{ rgba f 0.8 0.8 0.8 1.0 } }
     }
 
-<PRIVATE
-
-: inherit? ( format -- ? )
-    HS{
-        foreground background font-name font-size font-style
-    } in? ;
-
-PRIVATE>
-
-: inherit-style ( child parent -- child' )
-    [ drop inherit? ] assoc-filter swap assoc-union! ;
-
 ! Input history
 TUPLE: input string ;