xmode.highlight: highlight vocabs and pathnames too.

db4
John Benediktsson 2013-03-28 21:03:17 -07:00
parent 795f18a2b1
commit 577877f0e5
1 changed files with 10 additions and 3 deletions

View File

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