]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/cudatext/cudatext.factor
editors.cudatext: cleanup using
[factor.git] / basis / editors / cudatext / cudatext.factor
1 USING: editors io.pathnames io.standard-paths kernel make
2 math.parser namespaces sequences system ;
3
4 IN: editors.cudatext
5
6 SINGLETON: cudatext
7
8 editor-class [ cudatext ] initialize
9
10 HOOK: find-cudatext-path os ( -- path )
11
12 M: object find-cudatext-path f ;
13
14 M: macosx find-cudatext-path
15     "com.uvviewsoft.cudatext" find-native-bundle [
16         "Contents/MacOS/cudatext" append-path
17     ] [
18         f
19     ] if* ;
20
21 : cudatext-path ( -- path )
22     \ cudatext-path get [
23         find-cudatext-path [ "cudatext" ?find-in-path ] unless*
24     ] unless* ;
25
26 M: cudatext editor-command
27     [
28         cudatext-path , number>string ":" glue ,
29     ] { } make ;