]> gitweb.factorcode.org Git - factor.git/commitdiff
ultraedit autopath
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:57:03 +0000 (10:57 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 9 Dec 2007 16:57:03 +0000 (10:57 -0600)
extra/editors/ultraedit/ultraedit.factor

index d7a1a18132c2b630a8d37c333a792969c79c5ca2..50c241daea60e9a2566b9054829bfe3ffe7e6ba0 100644 (file)
@@ -1,12 +1,17 @@
-USING: editors io.launcher kernel math.parser namespaces ;
+USING: editors io.files io.launcher kernel math.parser
+namespaces sequences windows.shell32 ;
 IN: editors.ultraedit
 
+: ultraedit-path ( -- path )
+    \ ultraedit-path get-global [
+        program-files
+        "\\IDM Computer Solutions\\UltraEdit-32\\uedit32.exe" path+
+    ] unless* ;
+
 : ultraedit ( file line -- )
     [
-        \ ultraedit get-global % " " % swap % "/" % # "/1" %
+        ultraedit-path % " " % swap % "/" % # "/1" %
     ] "" make run-detached ;
 
-! Put the path in your .factor-boot-rc
-! "K:\\Program Files (x86)\\IDM Computer Solutions\\UltraEdit-32\\uedit32.exe" \ ultraedit set-global
 
 [ ultraedit ] edit-hook set-global