From 2e8df17b20a2d1c0fce57adbcd6c51a37f350e47 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 5 Oct 2007 01:19:30 -0400 Subject: [PATCH] Remove hilight style --- core/io/streams/nested/nested-tests.factor | 20 -------------------- core/io/streams/plain/plain.factor | 7 +++---- core/io/styles/styles-docs.factor | 4 ---- core/io/styles/styles.factor | 3 --- core/prettyprint/config/config-docs.factor | 6 ------ core/prettyprint/config/config.factor | 4 ---- core/prettyprint/prettyprint-docs.factor | 2 +- core/prettyprint/prettyprint-tests.factor | 6 ------ core/prettyprint/sections/sections.factor | 6 ------ extra/tools/annotations/annotations.factor | 2 +- 10 files changed, 5 insertions(+), 55 deletions(-) diff --git a/core/io/streams/nested/nested-tests.factor b/core/io/streams/nested/nested-tests.factor index fea88cf0bc..7b26beb9c6 100644 --- a/core/io/streams/nested/nested-tests.factor +++ b/core/io/streams/nested/nested-tests.factor @@ -1,23 +1,3 @@ USING: io io.streams.string io.streams.nested kernel math namespaces io.styles tools.test ; IN: temporary - -[ "=>a<=" ] [ - [ - [ - H{ { highlight t } } [ - H{ } [ "a" write ] with-nesting - ] with-style - ] string-out - ] with-scope -] unit-test - -[ "a" ] [ - [ - [ - H{ } [ - H{ { highlight t } } [ "a" write ] with-nesting - ] with-style - ] string-out - ] with-scope -] unit-test diff --git a/core/io/streams/plain/plain.factor b/core/io/streams/plain/plain.factor index 0647ee5e35..70421eb1c2 100644 --- a/core/io/streams/plain/plain.factor +++ b/core/io/streams/plain/plain.factor @@ -9,12 +9,11 @@ TUPLE: plain-writer ; : ( stream -- new-stream ) plain-writer construct-delegate ; -M: plain-writer stream-nl CHAR: \n swap stream-write1 ; +M: plain-writer stream-nl + CHAR: \n swap stream-write1 ; M: plain-writer stream-format - highlight rot at - [ >r "=>" swap "<=" 3append r> ] when - stream-write ; + nip stream-write ; M: plain-writer make-span-stream ; diff --git a/core/io/styles/styles-docs.factor b/core/io/styles/styles-docs.factor index a4c3040b13..5481560f94 100644 --- a/core/io/styles/styles-docs.factor +++ b/core/io/styles/styles-docs.factor @@ -106,10 +106,6 @@ HELP: presented-path HELP: presented-printer { $description "Character and paragraph style. A quotation with stack effect " { $snippet "( obj -- )" } " which is applied to the value at the " { $link presented-path } " if the presentation needs to be re-displayed after the object has been edited." } ; -HELP: highlight -{ $description "Character style. Used to mark up text on streams that otherwise do not support different colors or font styles." } -{ $examples "Instances of " { $link plain-writer } " uppercases highlighted text." } ; - HELP: page-color { $description "Paragraph style. Background color of the paragraph block, denoted by a sequence of four numbers between 0 and 1 (red, green, blue and alpha)." } { $examples diff --git a/core/io/styles/styles.factor b/core/io/styles/styles.factor index 25e87abee3..4c19d87435 100644 --- a/core/io/styles/styles.factor +++ b/core/io/styles/styles.factor @@ -19,9 +19,6 @@ SYMBOL: presented SYMBOL: presented-path SYMBOL: presented-printer -! Only for plain-stream -SYMBOL: highlight - ! Paragraph styles SYMBOL: page-color SYMBOL: border-color diff --git a/core/prettyprint/config/config-docs.factor b/core/prettyprint/config/config-docs.factor index e2a94cdf27..f197ac7966 100644 --- a/core/prettyprint/config/config-docs.factor +++ b/core/prettyprint/config/config-docs.factor @@ -27,9 +27,3 @@ HELP: line-limit HELP: string-limit { $var-description "Toggles whether printed strings are truncated to the margin." } ; - -HELP: hilite-quotation -{ $var-description "If set, printing this quotation will highlight the element with index " { $link hilite-index } " in an output stream-specific manner." } ; - -HELP: hilite-index -{ $var-description "If set, printing the quotation stored in " { $link hilite-quotation } " will highlight the element with this index in an output stream-specific manner." } ; diff --git a/core/prettyprint/config/config.factor b/core/prettyprint/config/config.factor index a4a331eed6..1474f51c53 100644 --- a/core/prettyprint/config/config.factor +++ b/core/prettyprint/config/config.factor @@ -13,10 +13,6 @@ SYMBOL: length-limit SYMBOL: line-limit SYMBOL: string-limit -! Special trick to highlight a word in a quotation -SYMBOL: hilite-quotation -SYMBOL: hilite-index - global [ 4 tab-size set 64 margin set diff --git a/core/prettyprint/prettyprint-docs.factor b/core/prettyprint/prettyprint-docs.factor index 3241a25d89..8467391d6d 100644 --- a/core/prettyprint/prettyprint-docs.factor +++ b/core/prettyprint/prettyprint-docs.factor @@ -204,7 +204,7 @@ HELP: stack. HELP: callstack. { $values { "callstack" callstack } } -{ $description "Displays a sequence output by " { $link callstack } " in a nice way, by highlighting the current execution point in every call frame." } ; +{ $description "Displays a sequence output by " { $link callstack } " in a nice way, by highlighting the current execution point in every call frame with " { $link -> } "." } ; HELP: .c { $description "Displays the contents of the call stack, with the top of the stack printed first." } ; diff --git a/core/prettyprint/prettyprint-tests.factor b/core/prettyprint/prettyprint-tests.factor index a38f68fae7..12b70f4bc5 100644 --- a/core/prettyprint/prettyprint-tests.factor +++ b/core/prettyprint/prettyprint-tests.factor @@ -53,12 +53,6 @@ unit-test [ "W{ \\ + }" ] [ [ W{ \ + } ] first unparse ] unit-test -[ "[ 1 2 =>dup<= ]" ] -[ - [ 1 2 dup ] dup hilite-quotation set 2 hilite-index set - [ pprint ] string-out -] unit-test - [ t ] [ "[ >r \"alloc\" add 0 0 r> ]" dup parse first unparse = ] unit-test diff --git a/core/prettyprint/sections/sections.factor b/core/prettyprint/sections/sections.factor index 6ca365c919..ff8e8b297d 100644 --- a/core/prettyprint/sections/sections.factor +++ b/core/prettyprint/sections/sections.factor @@ -151,12 +151,6 @@ TUPLE: block sections ; : last-section ( -- section ) pprinter-block block-sections [ break? not ] find-last nip ; -: hilite-style ( -- hash ) - H{ - { background { 0.9 0.9 0.9 1 } } - { highlight t } - } ; - : start-group ( -- ) t last-section set-section-start-group? ; diff --git a/extra/tools/annotations/annotations.factor b/extra/tools/annotations/annotations.factor index dd8941ffdf..d24d60cef6 100644 --- a/extra/tools/annotations/annotations.factor +++ b/extra/tools/annotations/annotations.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel words parser io inspector quotations sequences -prettyprint tools.interpreter ; +prettyprint continuations ; IN: tools.annotations : annotate ( word quot -- )