]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/notepad2/notepad2.factor
editors: allow them to be loaded in the load-all image
[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
7 editor-class [ notepad2 ] initialize
8
9 : notepad2-path ( -- path )
10     \ notepad2-path get [
11         windows-directory "system32\\notepad.exe" append-path
12         [ "notepad.exe" ] unless*
13     ] unless* ;
14
15 M: notepad2 editor-command
16     [
17         notepad2-path ,
18         "/g" , number>string , ,
19     ] { } make ;