Merge branch 'master' of git://factorcode.org/git/factor
[factor/jcg.git] / basis / editors / textpad / textpad.factor
blobca9d5c486af482558f7fed32ddc0b6964f620fd7
1 USING: editors io.files io.launcher kernel math.parser
2 namespaces sequences make io.directories.search
3 io.directories.search.windows ;
4 IN: editors.textpad
6 : textpad-path ( -- path )
7     \ textpad-path get-global [
8         "TextPad 5" t [ "TextPad.exe" tail? ] find-in-program-files
9         [ "TextPad.exe" ] unless*
10     ] unless* ;
12 : textpad ( file line -- )
13     [
14         textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi*
15     ] { } make run-detached drop ;
17 [ textpad ] edit-hook set-global