]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/emacs/emacs.factor
scryfall: make decks better, import from moxfield
[factor.git] / basis / editors / emacs / emacs.factor
1 USING: combinators.short-circuit editors io.standard-paths
2 kernel make math.parser namespaces sequences system vocabs ;
3 IN: editors.emacs
4
5 SINGLETON: emacs
6
7 editor-class [ emacs ] initialize
8
9 SYMBOL: emacsclient-path
10 SYMBOL: emacsclient-args
11
12 HOOK: find-emacsclient os ( -- path )
13
14 M: object find-emacsclient
15     "emacsclient" ?find-in-path ;
16
17 M: emacs editor-command
18     [
19         emacsclient-path get [ find-emacsclient ] unless* ,
20         emacsclient-args get [ { "-a=emacs" "--no-wait" } ] unless* %
21         number>string "+" prepend ,
22         ,
23     ] { } make ;
24
25 os windows? [ "editors.emacs.windows" require ] when