]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/etexteditor/etexteditor.factor
editors: allow them to be loaded in the load-all image
[factor.git] / basis / editors / etexteditor / etexteditor.factor
1 ! Copyright (C) 2008 Kibleur Christophe.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: editors io.standard-paths kernel make math.parser
4 namespaces ;
5 IN: editors.etexteditor
6
7 SINGLETON: etexteditor
8
9 editor-class [ etexteditor ] initialize
10
11 : etexteditor-path ( -- str )
12     \ etexteditor-path get [
13         { "e" } "e.exe" find-in-applications
14         [ "e.exe" ] unless*
15     ] unless* ;
16
17 M: etexteditor editor-command
18     [
19         etexteditor-path ,
20         [ , ] [ "--line" , number>string , ] bi*
21     ] { } make ;