]> gitweb.factorcode.org Git - factor.git/commitdiff
EditPlus automatically detects path
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:48:01 +0000 (10:48 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:48:01 +0000 (10:48 -0600)
extra/editors/editplus/editplus.factor [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index e47ca25..bff523b
@@ -1,12 +1,15 @@
-USING: editors io.launcher math.parser namespaces ;
+USING: editors io.files io.launcher kernel math.parser
+namespaces sequences windows.shell32 ;
 IN: editors.editplus
 
+: editplus-path ( -- path )
+    \ editplus-path get-global [
+        program-files "\\EditPlus 2\\editplus.exe" append
+    ] unless* ;
+
 : editplus ( file line -- )
     [
-        \ editplus get-global % " -cursor " % # " " % %
+        editplus-path % " -cursor " % # " " % %
     ] "" make run-detached ;
 
-! Put in your .factor-boot-rc
-! "c:\\Program Files\\EditPlus\\editplus.exe" \ editplus set-global
-
 [ editplus ] edit-hook set-global