From 88a7f8bf632bbbde0a8080644e20fe02ec7aec4d Mon Sep 17 00:00:00 2001
From: Doug Coleman <doug.coleman@gmail.com>
Date: Tue, 9 Apr 2013 12:17:21 -0700
Subject: [PATCH] editors.textadept: Add support for Windows.

---
 basis/editors/textadept/textadept.factor       | 11 ++++-------
 basis/editors/textadept/windows/platforms.txt  |  1 +
 basis/editors/textadept/windows/windows.factor |  9 +++++++++
 3 files changed, 14 insertions(+), 7 deletions(-)
 create mode 100644 basis/editors/textadept/windows/platforms.txt
 create mode 100644 basis/editors/textadept/windows/windows.factor

diff --git a/basis/editors/textadept/textadept.factor b/basis/editors/textadept/textadept.factor
index 3bf8b23261..d3c37ca313 100644
--- a/basis/editors/textadept/textadept.factor
+++ b/basis/editors/textadept/textadept.factor
@@ -9,9 +9,8 @@
 !
 ! For more information about Textadept, consult http://foicica.com/textadept/
 
-USING: editors io.launcher io.pathnames io.standard-paths kernel
-make math math.parser namespaces sequences system ;
-
+USING: editors io.launcher io.pathnames io.standard-paths
+kernel make math math.parser namespaces sequences system vocabs ;
 IN: editors.textadept
 
 SINGLETON: textadept
@@ -28,10 +27,6 @@ M: macosx find-textadept-path
         f
     ] if* ;
 
-! M: windows find-textadept-path
-!     let-Windows-users-fill-this-in
-!     ;
-
 : textadept-path  ( -- path )
     \ textadept-path get-global [
         find-textadept-path "textadept" or
@@ -42,3 +37,5 @@ M: textadept editor-command ( file line -- command )
         textadept-path , "-f" , , "-e" ,
         1 - number>string "goto_line(" ")" surround ,
     ] { } make ;
+
+os windows? [ "editors.textadept.windows" require ] when
diff --git a/basis/editors/textadept/windows/platforms.txt b/basis/editors/textadept/windows/platforms.txt
new file mode 100644
index 0000000000..8e1a55995e
--- /dev/null
+++ b/basis/editors/textadept/windows/platforms.txt
@@ -0,0 +1 @@
+windows
diff --git a/basis/editors/textadept/windows/windows.factor b/basis/editors/textadept/windows/windows.factor
new file mode 100644
index 0000000000..7dec4d87d8
--- /dev/null
+++ b/basis/editors/textadept/windows/windows.factor
@@ -0,0 +1,9 @@
+! Copyright (C) 2013 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: editors.textadept io.directories.search.windows
+sequences system ;
+IN: editors.textadept.windows
+
+M: windows find-textadept-path
+    "textadept_6.5.win32"
+    [ "textadept.exe" tail? ] find-in-program-files ;