From 5dc79fb2a555d549e8ccb1ad09a1bebba8f80e12 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 16 Jan 2009 12:51:53 -0600 Subject: [PATCH] add support for notepad --- basis/editors/notepad/authors.txt | 1 + basis/editors/notepad/notepad.factor | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 basis/editors/notepad/authors.txt create mode 100755 basis/editors/notepad/notepad.factor 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 +