]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/notepad2/notepad2.factor
Merge branch 'master' into experimental
[factor.git] / basis / editors / notepad2 / notepad2.factor
1 USING: editors io.files io.launcher kernel math.parser
2 namespaces sequences windows.shell32 make io.pathnames ;
3 IN: editors.notepad2
4
5 : notepad2-path ( -- path )
6     \ notepad2-path get-global [
7         windows-directory "system32\\notepad.exe" append-path
8         [ "notepad.exe" ] unless*
9     ] unless* ;
10
11 : notepad2 ( file line -- )
12     [
13         notepad2-path ,
14         "/g" , number>string , ,
15     ] { } make run-detached drop ;
16
17 [ notepad2 ] edit-hook set-global