]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/scite/scite.factor
editors: allow them to be loaded in the load-all image
[factor.git] / basis / editors / scite / scite.factor
1 ! Copyright (C) 2007 Clemens F. Hofreither.
2 ! See http://factorcode.org/license.txt for BSD license.
3 ! clemens.hofreither@gmx.net
4 USING: editors io.standard-paths kernel make math.parser
5 namespaces sequences system ;
6 IN: editors.scite
7
8 SINGLETON: scite
9
10 editor-class [ scite ] initialize
11
12 SYMBOL: scite-path
13
14 HOOK: find-scite-path os ( -- path )
15
16 M: unix find-scite-path "scite" ?find-in-path ;
17
18 M: windows find-scite-path
19     {
20         "Scintilla Text Editor"
21         "SciTE Source Code Editor"
22     } "scite.exe" find-in-applications
23     [ "scite.exe" ] unless* ;
24
25 M: scite editor-command
26     swap
27     [
28         scite-path get [ find-scite-path ] unless* ,
29         ,
30         number>string "-goto:" prepend ,
31     ] { } make ;