]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/atom/atom.factor
basis: removing unnecessary method stack effects.
[factor.git] / basis / editors / atom / atom.factor
1 ! Copyright (C) 2014 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: editors io.pathnames io.standard-paths kernel make
4 math.parser namespaces sequences system ;
5 IN: editors.atom
6
7 SINGLETON: atom-editor
8 atom-editor editor-class set-global
9
10 SYMBOL: atom-path
11
12 HOOK: find-atom os ( -- path )
13
14 M: object find-atom
15     "atom" ?find-in-path ;
16
17 M: macosx find-atom
18     "com.github.Atom" find-native-bundle [
19         "Contents/MacOS/Atom" append-path
20     ] [
21         f
22     ] if* ;
23
24 M: atom-editor editor-command
25     [
26         atom-path get [ find-atom ] unless* ,
27         number>string ":" glue ,
28     ] { } make ;