]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/notepad2/notepad2.factor
070273994c64e9da72bad9de6e107a18542f5c16
[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 SINGLETON: notepad2
6 notepad2 editor-class set-global
7
8 : notepad2-path ( -- path )
9     \ notepad2-path get [
10         windows-directory "system32\\notepad.exe" append-path
11         [ "notepad.exe" ] unless*
12     ] unless* ;
13
14 M: notepad2 editor-command ( file line -- command )
15     [
16         notepad2-path ,
17         "/g" , number>string , ,
18     ] { } make ;