run with --no-wait on windows so emacsclient doesn't block, use run-detached so that errors on emacsclient exit are ignored. emacs on windows is fully usable now

db4
Doug Coleman 2009-02-20 12:25:55 -06:00
parent 394ec538a1
commit 114d9bb21c
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
USING: definitions io.launcher kernel parser words sequences math
math.parser namespaces editors make system combinators.short-circuit ;
math.parser namespaces editors make system combinators.short-circuit
fry threads ;
IN: editors.emacs
SYMBOL: emacsclient-path
@ -11,10 +12,10 @@ M: object default-emacsclient ( -- path ) "emacsclient" ;
: emacsclient ( file line -- )
[
{ [ \ emacsclient-path get ] [ default-emacsclient ] } 0|| ,
os windows? [ "--no-wait" , ] unless
"--no-wait" ,
number>string "+" prepend ,
,
] { } make try-process ;
] { } make run-detached drop ;
: emacs ( word -- )
where first2 emacsclient ;