]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/geany/geany.factor
editors: allow them to be loaded in the load-all image
[factor.git] / basis / editors / geany / geany.factor
1 ! Copyright (C) 2013 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators.short-circuit editors io.standard-paths
4 kernel make math.parser namespaces system ;
5 IN: editors.geany
6
7 SINGLETON: geany
8
9 editor-class [ geany ] initialize
10
11 SYMBOL: geany-path
12
13 HOOK: find-geany-path os ( -- path )
14
15 M: unix find-geany-path "geany" ;
16
17 M: windows find-geany-path
18     {
19         [ { "Geany" } "geany.exe" find-in-applications ]
20         [ "Geany.exe" ]
21     } 0|| ;
22
23 M: geany editor-command
24     '[
25         geany-path get [ find-geany-path ] unless* ,
26         _ ,
27         "--line" , _ number>string ,
28     ] { } make ;