]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/notepad/notepad.factor
editors: allow them to be loaded in the load-all image
[factor.git] / basis / editors / notepad / notepad.factor
1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays editors io.directories kernel namespaces
4 sequences windows.shell32 ;
5
6 IN: editors.notepad
7
8 SINGLETON: notepad
9
10 editor-class [ notepad ] initialize
11
12 : notepad-path ( -- path )
13     \ notepad-path get [
14         windows-directory t
15         [ "notepad.exe" tail? ] find-file
16     ] unless* ;
17
18 M: notepad editor-command
19     drop [ notepad-path ] dip 2array ;