Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Windows-compatible

Signed-off-by: Darius Bacon <darius_bacon@yahoo.com>
  • Loading branch information...
commit 34d00bd5e72faba5ae1e32cbce6ed379bd259018 1 parent 07ec60c
@namin namin authored Darius Bacon committed
Showing with 12 additions and 4 deletions.
  1. +2 −0  ghcihalp.bat
  2. +1 −1  ghcihalp.py
  3. +7 −3 halp.el
  4. +2 −0  pyhalp.bat
View
2  ghcihalp.bat
@@ -0,0 +1,2 @@
+@ECHO off
+python ghcihalp.py %1
View
2  ghcihalp.py
@@ -92,4 +92,4 @@ def count(it):
i += 1
break
-sys.stdout.write(''.join(output))
+sys.stdout.write(''.join(output).replace('\r\n', '\n'))
View
10 halp.el
@@ -37,7 +37,7 @@
(defun halp-update-python ()
(interactive)
(halp-find-helpers-directory)
- (halp-update/diff (concat halp-helpers-directory "pyhalp.py")
+ (halp-update/diff (concat halp-helpers-directory (pick-by-os "pyhalp.py" "pyhalp.bat"))
(list (buffer-name (current-buffer)))))
(defun halp-update-javascript ()
@@ -47,11 +47,11 @@
(defun halp-update-haskell ()
(interactive)
- (halp-update-relative "ghcihalp.py" '(".hs")))
+ (halp-update-relative (pick-by-os "ghcihalp.py" "ghcihalp.bat") '(".hs")))
(defun halp-update-literate-haskell ()
(interactive)
- (halp-update-relative "ghcihalp.py" '(".lhs")))
+ (halp-update-relative (pick-by-os "ghcihalp.py" "ghcihalp.bat") '(".lhs")))
(defun halp-update-relative (command args)
(halp-find-helpers-directory)
@@ -176,6 +176,10 @@ that outputs a diff."
(defun halp-from (start)
(buffer-substring start (point)))
+(defun pick-by-os (default-file windows-file)
+ (if (eq system-type 'windows-nt)
+ windows-file
+ default-file))
;; Wrap-up
View
2  pyhalp.bat
@@ -0,0 +1,2 @@
+@ECHO off
+python pyhalp.py %1
Please sign in to comment.
Something went wrong with that request. Please try again.