fix wordpad

db4
Doug Coleman 2008-03-26 14:55:04 -05:00
parent 84a2a32a4e
commit b2a430629b
2 changed files with 6 additions and 5 deletions

View File

@ -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.
USING: parser kernel namespaces sequences definitions io.files
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
TUPLE: no-edit-hook ;
@ -25,7 +26,7 @@ SYMBOL: edit-hook
require ;
: 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 ( defspec -- )

View File

@ -5,10 +5,10 @@ IN: editors.wordpad
: wordpad-path ( -- path )
\ wordpad-path get [
program-files "\\Windows NT\\Accessories\\wordpad.exe" append-path
program-files "Windows NT\\Accessories\\wordpad.exe" append-path
] unless* ;
: 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