From 577877f0e5d202f3be8f29c5aa497c2ebfdb1428 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 28 Mar 2013 21:03:17 -0700 Subject: [PATCH] xmode.highlight: highlight vocabs and pathnames too. --- basis/xmode/highlight/highlight.factor | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/basis/xmode/highlight/highlight.factor b/basis/xmode/highlight/highlight.factor index 1a40867ed3..75e8ed3b4f 100644 --- a/basis/xmode/highlight/highlight.factor +++ b/basis/xmode/highlight/highlight.factor @@ -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 ;