diff --git a/basis/editors/notepad/authors.txt b/basis/editors/notepad/authors.txt new file mode 100755 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/editors/notepad/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/editors/notepad/notepad.factor b/basis/editors/notepad/notepad.factor new file mode 100755 index 0000000000..6094bf46b8 --- /dev/null +++ b/basis/editors/notepad/notepad.factor @@ -0,0 +1,18 @@ +! Copyright (C) 2009 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: editors io.launcher kernel io.directories.search.windows +math.parser namespaces sequences io.files arrays windows.shell32 +io.directories.search ; +IN: editors.notepad + +: notepad-path ( -- path ) + \ notepad-path get [ + windows-directory t + [ "notepad.exe" tail? ] find-file + ] unless* ; + +: notepad ( file line -- ) + drop notepad-path swap 2array run-detached drop ; + +[ notepad ] edit-hook set-global +