fix wordpad
parent
84a2a32a4e
commit
b2a430629b
|
@ -1,8 +1,9 @@
|
||||||
! Copyright (C) 2005, 2007 Slava Pestov.
|
! Copyright (C) 2005, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: parser kernel namespaces sequences definitions io.files
|
USING: parser kernel namespaces sequences definitions io.files
|
||||||
inspector continuations tuples tools.crossref tools.vocabs
|
inspector continuations tuples tools.crossref tools.vocabs
|
||||||
io prettyprint source-files assocs vocabs vocabs.loader ;
|
io prettyprint source-files assocs vocabs vocabs.loader
|
||||||
|
io.backend splitting ;
|
||||||
IN: editors
|
IN: editors
|
||||||
|
|
||||||
TUPLE: no-edit-hook ;
|
TUPLE: no-edit-hook ;
|
||||||
|
@ -25,7 +26,7 @@ SYMBOL: edit-hook
|
||||||
require ;
|
require ;
|
||||||
|
|
||||||
: edit-location ( file line -- )
|
: edit-location ( file line -- )
|
||||||
>r current-directory get prepend-path r>
|
>r normalize-pathname "\\\\?\\" ?head drop r>
|
||||||
edit-hook get [ call ] [ no-edit-hook edit-location ] if* ;
|
edit-hook get [ call ] [ no-edit-hook edit-location ] if* ;
|
||||||
|
|
||||||
: edit ( defspec -- )
|
: edit ( defspec -- )
|
||||||
|
|
|
@ -5,10 +5,10 @@ IN: editors.wordpad
|
||||||
|
|
||||||
: wordpad-path ( -- path )
|
: wordpad-path ( -- path )
|
||||||
\ wordpad-path get [
|
\ wordpad-path get [
|
||||||
program-files "\\Windows NT\\Accessories\\wordpad.exe" append-path
|
program-files "Windows NT\\Accessories\\wordpad.exe" append-path
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
: wordpad ( file line -- )
|
: wordpad ( file line -- )
|
||||||
drop wordpad-path swap 2array run-detached drop ;
|
drop wordpad-path swap 2array dup . run-detached drop ;
|
||||||
|
|
||||||
[ wordpad ] edit-hook set-global
|
[ wordpad ] edit-hook set-global
|
||||||
|
|
Loading…
Reference in New Issue