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