io.styles: bailed out on the with-nested-styles combinator

db4
Keith Lazuka 2009-09-11 20:35:56 -04:00
parent e1979f5ad5
commit 65e9c29a7b
3 changed files with 4 additions and 12 deletions

View File

@ -116,9 +116,11 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
] with-style ;
: $title ( topic -- )
title-style get [
title-style get [
[ ($title) ] [ ($navigation) ] bi
] with-nested-style nl ;
] with-nesting
] with-style nl ;
: print-topic ( topic -- )
>link

View File

@ -90,13 +90,6 @@ HELP: with-style
{ $notes "Details are in the documentation for " { $link make-span-stream } "." }
$io-error ;
HELP: with-nested-style
{ $values { "style" assoc } { "quot" quotation } }
{ $description "Calls the quotation in a new dynamic scope where calls to " { $link write } ", " { $link format } " and other stream output words automatically inherit style settings from " { $snippet "style" } "." }
$nl
"This word is intended to be used when you have a single style assoc that contains both character and paragraph styles."
$io-error ;
ARTICLE: "formatted-stream-protocol" "Formatted stream protocol"
"The " { $vocab-link "io.styles" } " vocabulary defines a protocol for output streams that support rich text."
{ $subsection stream-format }

View File

@ -42,9 +42,6 @@ make-cell-stream stream-write-table ;
[ output-stream get make-block-stream ] dip
with-output-stream ; inline
: with-nested-style ( style quot -- )
over [ with-nesting ] with-style ; inline
TUPLE: filter-writer stream ;
CONSULT: output-stream-protocol filter-writer stream>> ;