editors.jedit: update for jEdit 4.3.2, which places jEdit settings directory in $HOME/Library/jEdit instead of $HOME/.jedit on Mac OS X
parent
3806f02111
commit
1aaa756056
|
@ -1,14 +1,18 @@
|
||||||
! Copyright (C) 2004, 2008 Slava Pestov.
|
! Copyright (C) 2004, 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays definitions io kernel math
|
USING: arrays editors io io.binary io.encodings.ascii
|
||||||
namespaces parser prettyprint sequences strings words
|
io.encodings.binary io.encodings.utf8 io.files io.files.private
|
||||||
editors io.files io.sockets io.streams.byte-array io.binary
|
io.pathnames io.sockets io.streams.byte-array kernel locals
|
||||||
math.parser io.encodings.ascii io.encodings.binary
|
math.parser namespaces prettyprint sequences ;
|
||||||
io.encodings.utf8 io.files.private io.pathnames ;
|
|
||||||
IN: editors.jedit
|
IN: editors.jedit
|
||||||
|
|
||||||
: jedit-server-info ( -- port auth )
|
: jedit-server-file ( -- server-files )
|
||||||
home ".jedit/server" append-path ascii [
|
home ".jedit/server" append-path
|
||||||
|
home "Library/jEdit/server" append-path 2array
|
||||||
|
[ exists? ] find nip ;
|
||||||
|
|
||||||
|
: jedit-server-info ( server-file -- port auth )
|
||||||
|
ascii [
|
||||||
readln drop
|
readln drop
|
||||||
readln string>number
|
readln string>number
|
||||||
readln string>number
|
readln string>number
|
||||||
|
@ -24,11 +28,12 @@ IN: editors.jedit
|
||||||
"null});\n" write
|
"null});\n" write
|
||||||
] with-byte-writer ;
|
] with-byte-writer ;
|
||||||
|
|
||||||
: send-jedit-request ( request -- )
|
:: send-jedit-request ( request -- )
|
||||||
jedit-server-info "localhost" rot <inet> binary [
|
jedit-server-file jedit-server-info :> ( port auth )
|
||||||
4 >be write
|
"localhost" port <inet> binary [
|
||||||
dup length 2 >be write
|
auth 4 >be write
|
||||||
write
|
request length 2 >be write
|
||||||
|
request write
|
||||||
] with-client ;
|
] with-client ;
|
||||||
|
|
||||||
: jedit-location ( file line -- )
|
: jedit-location ( file line -- )
|
||||||
|
|
Loading…
Reference in New Issue