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

index 945233ff9baf08fd055e934c0fed5684057693c6..b56ee0a08b35830d3e8e7b3a141f82507949ebac 100644 (file)
@@ -1,9 +1,15 @@
-USING: editors io.launcher kernel math.parser namespaces ;
+USING: editors io.files io.launcher kernel math.parser
+namespaces sequences windows.shell32 ;
 IN: editors.ted-notepad
 
+: ted-notepad-path
+    \ ted-notepad-path get-global [
+        program-files "\\TED Notepad\\TedNPad.exe" path+
+    ] unless* ;
+
 : ted-notepad ( file line -- )
     [
-        \ ted-notepad get-global % " /l" % #
+        ted-notepad-path % " /l" % #
         " " % %
     ] "" make run-detached ;