factor/basis/editors/etexteditor/etexteditor.factor

22 lines
557 B
Factor
Raw Normal View History

2008-11-13 16:47:39 -05:00
! Copyright (C) 2008 Kibleur Christophe.
! See http://factorcode.org/license.txt for BSD license.
2015-06-01 17:39:30 -04:00
USING: editors io.standard-paths kernel make math.parser
namespaces ;
2008-11-13 16:47:39 -05:00
IN: editors.etexteditor
SINGLETON: etexteditor
etexteditor editor-class set-global
2008-11-13 16:47:39 -05:00
: etexteditor-path ( -- str )
2015-06-01 17:39:30 -04:00
\ etexteditor-path get [
{ "e" } "e.exe" find-in-applications
[ "e.exe" ] unless*
2008-11-13 16:47:39 -05:00
] unless* ;
M: etexteditor editor-command ( file line -- command )
2008-11-13 16:47:39 -05:00
[
2008-11-13 17:10:43 -05:00
etexteditor-path ,
2008-11-13 17:07:01 -05:00
[ , ] [ "--line" , number>string , ] bi*
] { } make ;
2008-11-13 16:47:39 -05:00