Skip to content

Commit

Permalink
Fix for Windows.
Browse files Browse the repository at this point in the history
quickrun assume Cygwin as Windows.
Put GCC ahead of Visual C++ on Windows Platform.
  • Loading branch information
syohex committed Apr 8, 2012
1 parent d7c43d4 commit c690ba3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions quickrun.el
Expand Up @@ -689,7 +689,8 @@ Place holders are beginning with '%' and replaced by:
;;
(defun quickrun/windows-p ()
(or (string= system-type "ms-dos")
(string= system-type "windows-nt")))
(string= system-type "windows-nt")
(string= system-type "cygwin")))

(defconst quickrun/support-languages
'("c" "c++" "objc" "perl" "ruby" "python" "php" "emacs" "lisp" "scheme"
Expand Down Expand Up @@ -733,14 +734,14 @@ by quickrun.el. But you can register your own command for some languages")
(let ((cmd-key (concat lang "/" executable)))
(puthash lang cmd-key quickrun/command-key-table)))))

(defun quickrun/add-command-if-windows (cmd lst)
(defun quickrun/append-commands-if-windows (cmds lst)
(if (quickrun/windows-p)
(cons cmd lst)
(append lst cmds)
lst))

(defconst quicklang/lang-candidates
`(("c" . ,(quickrun/add-command-if-windows "cl" '("gcc" "clang")))
("c++" . ,(quickrun/add-command-if-windows "cl" '("g++" "clang++")))
`(("c" . ,(quickrun/append-commands-if-windows '("cl") '("gcc" "clang")))
("c++" . ,(quickrun/append-commands-if-windows '("cl") '("g++" "clang++")))
("javascript" . ("node" "v8" "js" "jrunscript" "cscript"))
("lisp" . ("clisp" "sbcl" "ccl"))
("scheme" . ("gosh"))
Expand Down

0 comments on commit c690ba3

Please sign in to comment.