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
|
|
|
|
|
2011-10-31 14:53:07 -04:00
|
|
|
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* ;
|
|
|
|
|
2011-10-31 14:53:07 -04:00
|
|
|
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*
|
2011-10-31 14:53:07 -04:00
|
|
|
] { } make ;
|
2008-11-13 16:47:39 -05:00
|
|
|
|