]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/emacs/emacs.factor
Support multiline entries in the UI Listener
[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 SYMBOL: emacsclient-path
8 SYMBOL: emacsclient-args
9
10 HOOK: find-emacsclient os ( -- path )
11
12 M: object find-emacsclient
13     "emacsclient" ?find-in-path ;
14
15 M: emacs editor-command
16     [
17         emacsclient-path get [ find-emacsclient ] unless* ,
18         emacsclient-args get [ { "-a=emacs" "--no-wait" } ] unless* %
19         number>string "+" prepend ,
20         ,
21     ] { } make ;
22
23 os windows? [ "editors.emacs.windows" require ] when