]> gitweb.factorcode.org Git - factor.git/commitdiff
editors: bunch of cleanup.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Jun 2015 21:39:30 +0000 (14:39 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Jun 2015 21:39:30 +0000 (14:39 -0700)
41 files changed:
basis/editors/atom/atom.factor
basis/editors/editpadlite/editpadlite.factor
basis/editors/editpadpro/editpadpro.factor
basis/editors/editplus/editplus.factor
basis/editors/emacs/emacs.factor
basis/editors/emacs/windows/authors.txt [deleted file]
basis/editors/emacs/windows/tags.txt [deleted file]
basis/editors/emacs/windows/windows.factor [deleted file]
basis/editors/emeditor/emeditor.factor
basis/editors/etexteditor/etexteditor.factor
basis/editors/geany/geany.factor
basis/editors/geany/windows/authors.txt [deleted file]
basis/editors/geany/windows/platforms.txt [deleted file]
basis/editors/geany/windows/windows.factor [deleted file]
basis/editors/gedit/gedit.factor
basis/editors/gvim/gvim.factor
basis/editors/gvim/windows/authors.txt [deleted file]
basis/editors/gvim/windows/tags.txt [deleted file]
basis/editors/gvim/windows/windows.factor [deleted file]
basis/editors/jedit/jedit.factor
basis/editors/macvim/macvim.factor
basis/editors/notepad++/notepad++.factor
basis/editors/notepad2/notepad2.factor
basis/editors/notepad2/platforms.txt [new file with mode: 0644]
basis/editors/scite/scite.factor
basis/editors/scite/windows/authors.txt [deleted file]
basis/editors/scite/windows/platforms.txt [deleted file]
basis/editors/scite/windows/windows.factor [deleted file]
basis/editors/sublime/sublime.factor
basis/editors/sublime/windows/platforms.txt [deleted file]
basis/editors/sublime/windows/windows.factor [deleted file]
basis/editors/ted-notepad/ted-notepad.factor
basis/editors/textadept/textadept.factor
basis/editors/textadept/windows/platforms.txt [deleted file]
basis/editors/textadept/windows/windows.factor [deleted file]
basis/editors/textpad/textpad.factor
basis/editors/textwrangler/textwrangler.factor
basis/editors/ultraedit/ultraedit.factor
basis/editors/vim/vim.factor
basis/editors/visual-studio-code/visual-studio-code.factor
basis/editors/visual-studio-code/windows/windows.factor

index b6e81ed4309f9329b7e0b688c225953e5012e10a..a20f60cf6ddb59b01284c72b649025897464d229 100644 (file)
@@ -1,16 +1,17 @@
 ! Copyright (C) 2014 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors kernel make math.parser namespaces sequences ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences ;
 IN: editors.atom
 
 SINGLETON: atom-editor
-atom-editor editor-class set-global
+atom-editor editor-class set-global
 
 SYMBOL: atom-path
 
 M: atom-editor editor-command ( file line -- command )
     [
-        atom-path get "atom" or ,
+        atom-path get [ "atom" ?find-in-path ] unless* ,
         number>string ":" glue ,
     ] { } make ;
 
index de2a556f11813ce3b272f91eea6f6689825b2ddb..bf96457fd2c47bcabb4af6186d449e56a18a2262 100644 (file)
@@ -6,7 +6,7 @@ SINGLETON: editpadlite
 editpadlite editor-class set-global
 
 : editpadlite-path ( -- path )
-    \ editpadlite-path get-global [
+    \ editpadlite-path get [
         {
             [ { "Just Great Software" "JGsoft" } "editpadlite.exe" find-in-applications ]
             [ { "Just Great Software" "JGsoft" } "editpadlite7.exe" find-in-applications ]
index 0a618338c89e42460118de05d16c78508a82c728..4fe8fed8a0cf22885ea4c826e9016f0da04d7df0 100644 (file)
@@ -6,7 +6,7 @@ SINGLETON: editpadpro
 editpadpro editor-class set-global
 
 : editpadpro-path ( -- path )
-    \ editpadpro-path get-global [
+    \ editpadpro-path get [
         {
             [ { "Just Great Software" "JGsoft" } "editpadpro.exe" find-in-applications ]
             [ { "Just Great Software" "JGsoft" } "editpadpro7.exe" find-in-applications ]
index ac08432ffe482a570fb22ae19ea08382dd87631c..a3dc23887ca22377f64a640ddd96b09023652d49 100644 (file)
@@ -1,14 +1,13 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 make
-io.directories.search.windows ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces ;
 IN: editors.editplus
 
 SINGLETON: editplus
 editplus editor-class set-global
 
 : editplus-path ( -- path )
-    \ editplus-path get-global [
-        "EditPlus 2" [ "editplus.exe" tail? ] find-in-program-files
+    \ editplus-path get [
+        { "EditPlus 2" } "editplus.exe" find-in-applications
         [ "editplus.exe" ] unless*
     ] unless* ;
 
index 683ddcad25ad8448b6a118df2b73c8c9ebe15b26..e790b90093a11528685d2bd6ddc2696fe27aaa3b 100644 (file)
@@ -1,5 +1,5 @@
-USING: combinators.short-circuit editors kernel make
-math.parser namespaces sequences system vocabs ;
+USING: combinators.short-circuit editors io.standard-paths
+kernel make math.parser namespaces sequences system ;
 IN: editors.emacs
 
 SINGLETON: emacsclient
@@ -7,20 +7,22 @@ emacsclient editor-class set-global
 
 SYMBOL: emacsclient-path
 
-HOOK: default-emacsclient os ( -- path )
+HOOK: find-emacsclient os ( -- path )
 
-M: object default-emacsclient ( -- path ) "emacsclient" ;
+M: object find-emacsclient ( -- path )
+    "emacsclient" ?find-in-path ;
+
+M: windows find-emacsclient
+    {
+        [ { "Emacs" } "emacsclientw.exe" find-in-applications ]
+        [ { "Emacs" } "emacsclient.exe" find-in-applications ]
+        [ "emacsclient.exe" ]
+    } 0|| ;
 
 M: emacsclient editor-command ( file line -- command )
     [
-        {
-            [ emacsclient-path get-global ]
-            [ default-emacsclient dup emacsclient-path set-global ]
-        } 0|| ,
+        emacsclient-path get [ find-emacsclient ] unless* ,
         "--no-wait" ,
         number>string "+" prepend ,
         ,
     ] { } make ;
-
-os windows? [ "editors.emacs.windows" require ] when
-
diff --git a/basis/editors/emacs/windows/authors.txt b/basis/editors/emacs/windows/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/editors/emacs/windows/tags.txt b/basis/editors/emacs/windows/tags.txt
deleted file mode 100644 (file)
index ebb74b4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-not loaded
diff --git a/basis/editors/emacs/windows/windows.factor b/basis/editors/emacs/windows/windows.factor
deleted file mode 100644 (file)
index 91d6e87..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-! Copyright (C) 2009 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: editors.emacs io.directories.search.windows kernel sequences
-system combinators.short-circuit ;
-IN: editors.emacs.windows
-
-M: windows default-emacsclient
-    {
-        [ "Emacs" [ "emacsclientw.exe" tail? ] find-in-program-files ]
-        [ "Emacs" [ "emacsclient.exe" tail? ] find-in-program-files ]
-        [ "emacsclient.exe" ]
-    } 0|| ;
index 804c10747359dd7d5039e05076d1e596fb13b473..9f6c3ec745d252e3369800673718835792be22cb 100644 (file)
@@ -1,14 +1,13 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 make
-io.directories.search.windows ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces ;
 IN: editors.emeditor
 
 SINGLETON: emeditor
 emeditor editor-class set-global
 
 : emeditor-path ( -- path )
-    \ emeditor-path get-global [
-        "EmEditor" [ "EmEditor.exe" tail? ] find-in-program-files
+    \ emeditor-path get [
+        { "EmEditor" } "emeditor.exe" find-in-applications
         [ "EmEditor.exe" ] unless*
     ] unless* ;
 
index fd2d60946eb677965ef8642859efb185c1e4c348..5964f04a4ab128e958fcd4c1e8437f6e4dc89ee0 100644 (file)
@@ -1,16 +1,16 @@
 ! Copyright (C) 2008 Kibleur Christophe.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors io.files io.launcher kernel math.parser make
-namespaces sequences windows.shell32 io.directories.search.windows ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces ;
 IN: editors.etexteditor
 
 SINGLETON: etexteditor
 etexteditor editor-class set-global
 
 : etexteditor-path ( -- str )
-    \ etexteditor-path get-global [
-        "e" [ "e.exe" tail? ] find-in-program-files
-        [ "e" ] unless*
+    \ etexteditor-path get [
+        { "e" } "e.exe" find-in-applications
+        [ "e.exe" ] unless*
     ] unless* ;
 
 M: etexteditor editor-command ( file line -- command )
index f273812e58a0af8edbd518c8623a29ee75eb159f..cdaa47ec86013d18b94e70e044fbdeac47d1f9a0 100644 (file)
@@ -1,22 +1,27 @@
 ! Copyright (C) 2013 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors fry kernel make math.parser namespaces system
-vocabs ;
+USING: combinators.short-circuit editors fry io.standard-paths
+kernel make math.parser namespaces system vocabs ;
 IN: editors.geany
 
 SINGLETON: geany
 geany editor-class set-global
 
-HOOK: geany-path os ( -- path )
+SYMBOL: geany-path
 
-M: unix geany-path
-    \ geany-path get-global [ "geany" ] unless* ;
+HOOK: find-geany-path os ( -- path )
+
+M: unix find-geany-path "geany" ;
+
+M: windows find-geany-path
+    {
+        [ { "Geany" } "geany.exe" find-in-applications ]
+        [ "Geany.exe" ]
+    } 0|| ;
 
 M: geany editor-command
     '[
-        geany-path ,
+        geany-path get [ find-geany-path ] unless* ,
         _ ,
         "--line" , _ number>string ,
     ] { } make ;
-
-os windows? [ "editors.geany.windows" require ] when
\ No newline at end of file
diff --git a/basis/editors/geany/windows/authors.txt b/basis/editors/geany/windows/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/editors/geany/windows/platforms.txt b/basis/editors/geany/windows/platforms.txt
deleted file mode 100644 (file)
index 8e1a559..0000000
+++ /dev/null
@@ -1 +0,0 @@
-windows
diff --git a/basis/editors/geany/windows/windows.factor b/basis/editors/geany/windows/windows.factor
deleted file mode 100644 (file)
index a4606d6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-! Copyright (C) 2013 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: editors.geany io.directories.search.windows kernel
-namespaces sequences system ;
-IN: editors.geany.windows
-
-M: windows geany-path
-    \ geany-path get-global [
-        "Geany" [ "Geany.exe" tail? ] find-in-program-files
-    ] unless* ;
\ No newline at end of file
index a1920fd389420a3d27e5cf505cbe37e1795862b4..f1d7b9314f828e8676df8e94f17c6751dc36a97d 100644 (file)
@@ -1,15 +1,15 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors io.launcher kernel make math.parser namespaces
-sequences ;
+USING: editors io.launcher io.standard-paths kernel make
+math.parser namespaces sequences ;
 IN: editors.gedit
 
 SINGLETON: gedit
 gedit editor-class set-global
 
 : gedit-path ( -- path )
-    \ gedit-path get-global [
-        "gedit"
+    \ gedit-path get [
+        "gedit" ?find-in-path
     ] unless* ;
 
 M: gedit editor-command ( file line -- command )
index 878c73dbdd51f6cab1087e4996b4fbf3d6dd72a4..e776437ce16c469ddd1a2c83982facafff331c9b 100644 (file)
@@ -1,5 +1,5 @@
-USING: editors.vim io.backend kernel namespaces system
-vocabs editors ;
+USING: editors.vim io.backend io.standard-paths kernel
+namespaces system vocabs editors ;
 IN: editors.gvim
 
 ! This code builds on the code in editors.vim; see there for
@@ -9,10 +9,15 @@ TUPLE: gvim < vim ;
 T{ gvim } editor-class set-global
 
 HOOK: find-gvim-path io-backend ( -- path )
+
 M: object find-gvim-path f ;
 
-M: gvim find-vim-path find-gvim-path "gvim" or ;
+M: windows find-gvim-path
+    { "vim" } "gvim.exe" find-in-applications ;
+
+M: gvim find-vim-path
+    find-gvim-path [ "gvim" ?find-in-path ] unless* ;
+
 M: gvim vim-ui? t ;
-M: gvim editor-detached? t ;
 
-os windows? [ "editors.gvim.windows" require ] when
+M: gvim editor-detached? t ;
diff --git a/basis/editors/gvim/windows/authors.txt b/basis/editors/gvim/windows/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/editors/gvim/windows/tags.txt b/basis/editors/gvim/windows/tags.txt
deleted file mode 100644 (file)
index ebb74b4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-not loaded
diff --git a/basis/editors/gvim/windows/windows.factor b/basis/editors/gvim/windows/windows.factor
deleted file mode 100644 (file)
index 380e6bb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-USING: editors.gvim io.directories.search.windows sequences
-system ;
-IN: editors.gvim.windows
-
-M: windows find-gvim-path
-    "vim" [ "gvim.exe" tail? ] find-in-program-files ;
index fa8f6f66e5d37f256873a02c424acd675006b03d..7a2b8114ede1dc718c7488c338cfe1e97372a2e5 100644 (file)
@@ -12,18 +12,21 @@ ERROR: jedit-not-found ;
 
 HOOK: find-jedit-path os ( -- path )
 
-M: object find-jedit-path "jedit" ;
+M: object find-jedit-path f ;
 
 M: macosx find-jedit-path
-    "org.gjt.sp.jedit" find-native-bundle
-    dup [ "Contents/MacOS/jedit" append-path ] when ;
+    "org.gjt.sp.jedit" find-native-bundle [
+        "Contents/MacOS/jedit" append-path
+    ] [
+        f
+    ] if* ;
 
 M: windows find-jedit-path
     { "jedit" } "jedit.exe" find-in-applications ;
-    
+
 : jedit-path ( -- path )
-    \ jedit-path get-global [
-        find-jedit-path "jedit" or
+    \ jedit-path get [
+        find-jedit-path [ "jedit" ?find-in-path ] unless*
     ] unless* ;
 
 M: jedit editor-command ( file line -- command/f )
index 62250ba6ce1e83375e53dd05c1c60479f9d9946d..62788330767706d2113209515da89fecf063bfbd 100644 (file)
@@ -3,7 +3,7 @@ io.pathnames io.standard-paths kernel namespaces ;
 IN: editors.macvim
 
 TUPLE: macvim < vim ;
-T{ macvim } editor-class set-global
+T{ macvim } editor-class set-global
 
 : find-macvim-bundle-path ( -- path/f )
     "org.vim.MacVim" find-native-bundle [
@@ -11,8 +11,9 @@ T{ macvim } \ editor-class set-global
     ] [
         f
     ] if* ;
-    
+
 M: macvim find-vim-path find-macvim-bundle-path ;
 
 M: macvim vim-ui? t ;
+
 M: macvim editor-detached? t ;
index 2f6393f9674b365729f6614d5ef8d8be884005f0..9951943dc83fdb437774df2b6c571c5b7b176ce7 100644 (file)
@@ -1,18 +1,18 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.directories.search.windows make ;
-IN: editors.notepadpp
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences ;
+IN: editors.notepad++
 
-SINGLETON: notepadpp
-notepadpp editor-class set-global
+SINGLETON: notepad++
+notepad++ editor-class set-global
 
-: notepadpp-path ( -- path )
-    \ notepadpp-path get-global [
-        "notepad++" [ "notepad++.exe" tail? ] find-in-program-files
+: notepad++-path ( -- path )
+    \ notepad++-path get [
+        { "notepad++" } "notepad++.exe" find-in-applications
         [ "notepad++.exe" ] unless*
     ] unless* ;
 
-M: notepadpp editor-command ( file line -- command )
+M: notepad++ editor-command ( file line -- command )
     [
-        notepadpp-path ,
+        notepad++-path ,
         number>string "-n" prepend , ,
     ] { } make ;
index 744bab40e267fd66640c2b2a450735ea8435e70e..070273994c64e9da72bad9de6e107a18542f5c16 100644 (file)
@@ -6,7 +6,7 @@ SINGLETON: notepad2
 notepad2 editor-class set-global
 
 : notepad2-path ( -- path )
-    \ notepad2-path get-global [
+    \ notepad2-path get [
         windows-directory "system32\\notepad.exe" append-path
         [ "notepad.exe" ] unless*
     ] unless* ;
diff --git a/basis/editors/notepad2/platforms.txt b/basis/editors/notepad2/platforms.txt
new file mode 100644 (file)
index 0000000..8e1a559
--- /dev/null
@@ -0,0 +1 @@
+windows
index 68df8aef559854212e1c7611d3a046ce6f6c1bc5..49e1d74b07f022edf82dbd8999e30189abb7aeb3 100644 (file)
@@ -1,25 +1,30 @@
 ! Copyright (C) 2007 Clemens F. Hofreither.
 ! See http://factorcode.org/license.txt for BSD license.
 ! clemens.hofreither@gmx.net
-USING: io.files io.launcher kernel namespaces
-math math.parser editors sequences make system unicode.case
-vocabs ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences system ;
 IN: editors.scite
 
 SINGLETON: scite
 scite editor-class set-global
 
-HOOK: scite-path os ( -- path )
+SYMBOL: scite-path
 
-M: unix scite-path ( -- path )
-    \ scite-path get-global [ "scite" ] unless* ;
+HOOK: find-scite-path os ( -- path )
+
+M: unix find-scite-path "scite" ?find-in-path ;
+
+M: windows find-scite-path
+    {
+        "Scintilla Text Editor"
+        "SciTE Source Code Editor"
+    } "scite.exe" find-in-applications
+    [ "scite.exe" ] unless* ;
 
 M: scite editor-command ( file line -- cmd )
     swap
     [
-        scite-path ,
+        scite-path get [ find-scite-path ] unless* ,
         ,
         number>string "-goto:" prepend ,
     ] { } make ;
-
-os windows? [ "editors.scite.windows" require ] when
diff --git a/basis/editors/scite/windows/authors.txt b/basis/editors/scite/windows/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/editors/scite/windows/platforms.txt b/basis/editors/scite/windows/platforms.txt
deleted file mode 100644 (file)
index 8e1a559..0000000
+++ /dev/null
@@ -1 +0,0 @@
-windows
diff --git a/basis/editors/scite/windows/windows.factor b/basis/editors/scite/windows/windows.factor
deleted file mode 100644 (file)
index 8bfcb4f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-! Copyright (C) 2013 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: editors.scite io.directories.search.windows kernel
-namespaces sequences system unicode.case ;
-IN: editors.scite.windows
-
-M: windows scite-path ( -- path )
-    \ scite-path get-global [
-        "Scintilla Text Editor"
-        [ >lower "scite.exe" tail? ] find-in-program-files
-
-        [
-            "SciTE Source Code Editor"
-            [ >lower "scite.exe" tail? ] find-in-program-files
-        ] unless*
-        [ "scite.exe" ] unless*
-    ] unless* ;
-
index ff860bd194f3d52e00bf1653d55bd933d081e1f5..83c2283f6fd81df4277e07bc4f8470e721d9e4c8 100644 (file)
@@ -9,7 +9,7 @@ sublime editor-class set-global
 
 HOOK: find-sublime-path os ( -- path )
 
-M: object find-sublime-path "sublime" ;
+M: object find-sublime-path f ;
 
 M: macosx find-sublime-path
     { "com.sublimetext.3" "com.sublimetext.2" } [ find-native-bundle ] map-find drop [
@@ -18,11 +18,12 @@ M: macosx find-sublime-path
         f
     ] if* ;
 
-ERROR: editor-not-found editor ;
+M: windows find-sublime-path
+    { "Sublime Text 2" } "sublime_text.exe" find-in-applications ;
 
 : sublime-path  ( -- path )
-    \ sublime-path get-global [
-        find-sublime-path [ "sublime" editor-not-found ] unless*
+    \ sublime-path get [
+        find-sublime-path [ "subl" ?find-in-path ] unless*
     ] unless* ;
 
 M: sublime editor-command ( file line -- command )
diff --git a/basis/editors/sublime/windows/platforms.txt b/basis/editors/sublime/windows/platforms.txt
deleted file mode 100644 (file)
index 8e1a559..0000000
+++ /dev/null
@@ -1 +0,0 @@
-windows
diff --git a/basis/editors/sublime/windows/windows.factor b/basis/editors/sublime/windows/windows.factor
deleted file mode 100644 (file)
index abf2fc1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-! Copyright (C) 2013 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: editors.sublime io.directories.search.windows sequences
-system ;
-IN: editors.sublime.windows
-
-M: windows find-sublime-path
-    "Sublime Text 2"
-    [ "sublime_text.exe" tail? ] find-in-program-files ;
index 7f8fb7e7c72b5a0e28132f749d992f0706a41be3..c463b0b29427a3de9ad21341accf379b2fae07a7 100644 (file)
@@ -1,13 +1,13 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.directories.search.windows make ;
+USING: editors io.files io.launcher io.standard-paths kernel
+math.parser namespaces sequences make ;
 IN: editors.ted-notepad
 
 SINGLETON: ted-notepad
 ted-notepad editor-class set-global
 
 : ted-notepad-path ( -- path )
-    \ ted-notepad-path get-global [
-        "TED Notepad" [ "TedNPad.exe" tail? ] find-in-program-files
+    \ ted-notepad-path get [
+        { "TED Notepad" } "tednpad.exe" find-in-applications
         [ "TedNPad.exe" ] unless*
     ] unless* ;
 
index d3c37ca3131b26ee7474092e6806c13c64aa7345..0d370955737b2c4805f4511883ad878e87921173 100644 (file)
@@ -9,8 +9,9 @@
 !
 ! 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 vocabs ;
+USING: combinators.short-circuit editors io.launcher
+io.pathnames io.standard-paths kernel make math math.parser
+namespaces sequences system vocabs ;
 IN: editors.textadept
 
 SINGLETON: textadept
@@ -18,7 +19,7 @@ textadept editor-class set-global
 
 HOOK: find-textadept-path os ( -- path )
 
-M: object find-textadept-path "textadept" ;
+M: object find-textadept-path f ;
 
 M: macosx find-textadept-path
     "com.textadept" find-native-bundle [
@@ -27,9 +28,13 @@ M: macosx find-textadept-path
         f
     ] if* ;
 
+M: windows find-textadept-path
+    { "textadept_6.5.win32" } "textadept.exe" find-in-applications
+    [ "textadept.exe" ] unless* ;
+
 : textadept-path  ( -- path )
-    \ textadept-path get-global [
-        find-textadept-path "textadept" or
+    \ textadept-path get [
+        find-textadept-path [ "textadept" ?find-in-path ] unless*
     ] unless* ;
 
 M: textadept editor-command ( file line -- command )
@@ -37,5 +42,3 @@ 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
deleted file mode 100644 (file)
index 8e1a559..0000000
+++ /dev/null
@@ -1 +0,0 @@
-windows
diff --git a/basis/editors/textadept/windows/windows.factor b/basis/editors/textadept/windows/windows.factor
deleted file mode 100644 (file)
index 7dec4d8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-! 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 ;
index 6e809910e2c1d0a77e34bbcb5069863aa393ce0a..a2b0abb6e60b5fc447c551316a55989ac3f9ee8a 100644 (file)
@@ -1,6 +1,5 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences make io.directories.search
-io.directories.search.windows ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences ;
 IN: editors.textpad
 
 SINGLETON: textpad
@@ -8,11 +7,12 @@ textpad editor-class set-global
 
 : textpad-path ( -- path )
     \ textpad-path get-global [
-        "TextPad 5" [ "TextPad.exe" tail? ] find-in-program-files
+        { "TextPad 5" } "textpad.exe" find-in-applications
         [ "TextPad.exe" ] unless*
     ] unless* ;
 
 M: textpad editor-command ( file line -- command )
     [
-        textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi*
+        textpad-path ,
+        [ , ] [ number>string "(" ",0)" surround , ] bi*
     ] { } make ;
index 1f645298d720225fafeace645258bb13d13ce836..d95eae9f51b9984345f77b6315ed0bea014d9858 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Ben Schlingelhof.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors kernel make math.parser namespaces sequences
-tools.which ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences ;
 IN: editors.textwrangler
 
 ! TextWrangler ships with a program called ``edit`` if you don't download
@@ -14,12 +14,12 @@ IN: editors.textwrangler
 SINGLETON: textwrangler
 textwrangler editor-class set-global
 
-M: textwrangler editor-command ( file line -- command )
-    "edit" which [
-        [ "edit +" % # " " % % ] "" make
+M: textwrangler editor-command
+    "edit" find-in-path [
+        [ , number>string "+" prepend , , ] { } make
     ] [
         [
             "open" , "-a" , "TextWrangler" ,
             [ , ] [ "--args" , number>string "+" prepend , ] bi*
         ] { } make
-    ] if ;
+    ] if* ;
index 42c1c42dfa14b2049fd4aef093cf5567c032090e..ec69b8047228c74682525da1f493cc4219b2a35a 100644 (file)
@@ -1,5 +1,5 @@
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.directories.search.windows make ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces ;
 IN: editors.ultraedit
 
 SINGLETON: ultraedit
@@ -7,7 +7,7 @@ ultraedit editor-class set-global
 
 : ultraedit-path ( -- path )
     \ ultraedit-path get-global [
-        "IDM Computer Solutions" [ "uedit32.exe" tail? ] find-in-program-files
+        { "IDM Computer Solutions" } "uedit32.exe" find-in-applications
         [ "uedit32.exe" ] unless*
     ] unless* ;
 
index fb15a9387de69aa850e00421ee23dd4add224630..7aa46499d78a2056429edfe61da399390eeba1e9 100644 (file)
@@ -1,5 +1,5 @@
-USING: editors io.backend io.launcher kernel make math.parser
-namespaces sequences strings system vocabs.loader math ;
+USING: editors io.standard-paths kernel make math.parser
+namespaces sequences strings ;
 IN: editors.vim
 
 TUPLE: vim ;
@@ -8,12 +8,15 @@ T{ vim } editor-class set-global
 SYMBOL: vim-path
 
 HOOK: find-vim-path editor-class ( -- path )
+
 HOOK: vim-ui? editor-class ( -- ? )
+
 M: vim vim-ui? f ;
-M: vim find-vim-path "vim" ;
+
+M: vim find-vim-path "vim" ?find-in-path ;
 
 : actual-vim-path ( -- path )
-    \ vim-path get-global [ find-vim-path ] unless* ;
+    \ vim-path get [ find-vim-path ] unless* ;
 
 M: vim editor-command ( file line -- command )
     [
index 5cac796904b34e50afbcf9f0984cb975882b3c94..22f460ea7424d30feddfec41337c685d529bd8f5 100644 (file)
@@ -9,15 +9,14 @@ visual-studio-code editor-class set-global
 HOOK: find-visual-studio-code-path os ( -- path )
 
 MEMO: visual-studio-code-path ( -- path )
-    \ visual-studio-code-path get-global [
+    \ visual-studio-code-path get [
         find-visual-studio-code-path
         [ "code" ] unless*
     ] unless* ;
 
 M: visual-studio-code editor-command ( file line -- command )
     [
-        visual-studio-code-path ,
-        swap , drop
+        visual-studio-code-path , drop ,
     ] { } make ;
 
 os windows? [ "editors.visual-studio-code.windows" require ] when
index 2467564d9fa6eb5b6528b7e9c62447575d9fbdde..703e47aae4d5d0a6ae57540f9319440f60f332f8 100644 (file)
@@ -6,5 +6,5 @@ system ;
 IN: editors.visual-studio-code.windows
 
 M: windows find-visual-studio-code-path
-    get-appdata-directory 1array f
+    get-appdata-directory f
     [ file-name >lower "code.exe" = ] find-in-directories ;