]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/aquamacs/aquamacs.factor
Reformat
[factor.git] / basis / editors / aquamacs / aquamacs.factor
1 ! File: aquamacs.factor
2 ! Version: 0.1
3 ! DRI: Dave Carlton
4 ! Description: Another fine Factor file!
5 ! Copyright (C) 2017 Dave Carlton.
6 ! See https://factorcode.org/license.txt for BSD license.
7 USING: editors io.pathnames io.standard-paths kernel make
8 math.parser namespaces sequences system ;
9 IN: editors.aquamacs
10
11 SINGLETON: aquamacs
12
13 HOOK: find-aquamacs-path os ( -- path )
14
15 M: object find-aquamacs-path f ;
16
17 M: macosx find-aquamacs-path
18     "org.gnu.Aquamacs" find-native-bundle [
19         "Contents/MacOS/bin/aquamacs" append-path
20     ] [
21         f
22     ] if* ;
23
24 : aquamacs-path ( -- path )
25     \ aquamacs-path get [
26         find-aquamacs-path [ "aquamacs" ?find-in-path ] unless*
27     ] unless* ;
28
29 M: aquamacs editor-command ( file line -- command )
30     [ aquamacs-path , drop , ] { } make ;