factor/basis/editors/emacs/emacs.factor

18 lines
427 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: definitions io.launcher kernel parser words sequences math
2008-11-16 20:15:09 -05:00
math.parser namespaces editors make system ;
2007-09-20 18:09:08 -04:00
IN: editors.emacs
: emacsclient ( file line -- )
[
2008-11-12 02:14:19 -05:00
\ emacsclient get "emacsclient" or ,
2008-11-16 20:15:09 -05:00
os windows? [ "--no-wait" , ] unless
2008-01-24 02:50:40 -05:00
"+" swap number>string append ,
,
2008-02-08 22:15:29 -05:00
] { } make try-process ;
2007-09-20 18:09:08 -04:00
: emacs ( word -- )
where first2 emacsclient ;
[ emacsclient ] edit-hook set-global