]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/geany/geany.factor
005fa94cb566f69ee6cae28bccfed3bdcb1444ea
[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 geany editor-class set-global
9
10 SYMBOL: geany-path
11
12 HOOK: find-geany-path os ( -- path )
13
14 M: unix find-geany-path "geany" ;
15
16 M: windows find-geany-path
17     {
18         [ { "Geany" } "geany.exe" find-in-applications ]
19         [ "Geany.exe" ]
20     } 0|| ;
21
22 M: geany editor-command
23     '[
24         geany-path get [ find-geany-path ] unless* ,
25         _ ,
26         "--line" , _ number>string ,
27     ] { } make ;