make emacsw32 work on windows out of the box

db4
Doug Coleman 2009-02-20 12:15:26 -06:00
parent 19acf89d82
commit 394ec538a1
3 changed files with 19 additions and 4 deletions

View File

@ -1,12 +1,18 @@
USING: definitions io.launcher kernel parser words sequences math
math.parser namespaces editors make system ;
math.parser namespaces editors make system combinators.short-circuit ;
IN: editors.emacs
SYMBOL: emacsclient-path
HOOK: default-emacsclient os ( -- path )
M: object default-emacsclient ( -- path ) "emacsclient" ;
: emacsclient ( file line -- )
[
\ emacsclient get "emacsclient" or ,
{ [ \ emacsclient-path get ] [ default-emacsclient ] } 0|| ,
os windows? [ "--no-wait" , ] unless
"+" swap number>string append ,
number>string "+" prepend ,
,
] { } make try-process ;
@ -14,4 +20,3 @@ IN: editors.emacs
where first2 emacsclient ;
[ emacsclient ] edit-hook set-global

View File

@ -0,0 +1 @@
Doug Coleman

View File

@ -0,0 +1,9 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: editors.emacs io.directories.search.windows kernel sequences
system ;
IN: editors.emacs.windows
M: windows default-emacsclient
"Emacs" t [ "emacsclient.exe" tail? ] find-in-program-files
"emacsclient.exe" or ;