]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/notepad/notepad.factor
6094bf46b89f72a0359a42fe81ad753523c9c03d
[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: editors io.launcher kernel io.directories.search.windows
4 math.parser namespaces sequences io.files arrays windows.shell32
5 io.directories.search ;
6 IN: editors.notepad
7
8 : notepad-path ( -- path )
9     \ notepad-path get [
10         windows-directory t
11         [ "notepad.exe" tail? ] find-file
12     ] unless* ;
13
14 : notepad ( file line -- )
15     drop notepad-path swap 2array run-detached drop ;
16
17 [ notepad ] edit-hook set-global
18