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
parent
394ec538a1
commit
114d9bb21c
|
@ -1,5 +1,6 @@
|
||||||
USING: definitions io.launcher kernel parser words sequences math
|
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
|
IN: editors.emacs
|
||||||
|
|
||||||
SYMBOL: emacsclient-path
|
SYMBOL: emacsclient-path
|
||||||
|
@ -11,10 +12,10 @@ M: object default-emacsclient ( -- path ) "emacsclient" ;
|
||||||
: emacsclient ( file line -- )
|
: emacsclient ( file line -- )
|
||||||
[
|
[
|
||||||
{ [ \ emacsclient-path get ] [ default-emacsclient ] } 0|| ,
|
{ [ \ emacsclient-path get ] [ default-emacsclient ] } 0|| ,
|
||||||
os windows? [ "--no-wait" , ] unless
|
"--no-wait" ,
|
||||||
number>string "+" prepend ,
|
number>string "+" prepend ,
|
||||||
,
|
,
|
||||||
] { } make try-process ;
|
] { } make run-detached drop ;
|
||||||
|
|
||||||
: emacs ( word -- )
|
: emacs ( word -- )
|
||||||
where first2 emacsclient ;
|
where first2 emacsclient ;
|
||||||
|
|
Loading…
Reference in New Issue