Does not allow C-cC-c when hlint does not exist.

This commit is contained in:
Kazu Yamamoto 2010-05-29 13:33:54 +09:00
parent cd708e28f6
commit 6e6e1c9ad7
1 changed files with 7 additions and 4 deletions

View File

@ -43,10 +43,13 @@
(defun ghc-flymake-toggle-command ()
(interactive)
(setq ghc-flymake-command (not ghc-flymake-command))
(if ghc-flymake-command
(message "Syntax check with hlint")
(message "Syntax check with GHC")))
(if (and (null ghc-flymake-command)
(not ghc-hlint))
(message "\"hlint\" not found")
(setq ghc-flymake-command (not ghc-flymake-command))
(if ghc-flymake-command
(message "Syntax check with hlint")
(message "Syntax check with GHC"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;