xmode.highlight: highlight vocabs and pathnames too.
parent
795f18a2b1
commit
577877f0e5
|
@ -1,9 +1,10 @@
|
||||||
! Copyright (C) 2011 John Benediktsson
|
! Copyright (C) 2011 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: accessors assocs colors.hex io io.encodings.utf8
|
USING: accessors assocs colors.hex io io.encodings.utf8 io.files
|
||||||
io.files io.streams.string io.styles kernel locals see
|
io.pathnames io.streams.string io.styles kernel locals see
|
||||||
sequences splitting strings words xmode.catalog xmode.marker ;
|
sequences splitting strings vocabs vocabs.loader words
|
||||||
|
xmode.catalog xmode.marker ;
|
||||||
|
|
||||||
IN: xmode.highlight
|
IN: xmode.highlight
|
||||||
|
|
||||||
|
@ -62,6 +63,12 @@ M:: string highlight. ( path -- )
|
||||||
path over first find-mode highlight-lines
|
path over first find-mode highlight-lines
|
||||||
] unless-empty ;
|
] unless-empty ;
|
||||||
|
|
||||||
|
M: pathname highlight.
|
||||||
|
string>> highlight. ;
|
||||||
|
|
||||||
|
M: vocab highlight.
|
||||||
|
vocab-source-path highlight. ;
|
||||||
|
|
||||||
M: word highlight.
|
M: word highlight.
|
||||||
[ see ] with-string-writer string-lines
|
[ see ] with-string-writer string-lines
|
||||||
"factor" highlight-lines ;
|
"factor" highlight-lines ;
|
||||||
|
|
Loading…
Reference in New Issue