From 5dd3bb83eb155207e5312afdc653d62e1764776f Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 8 Jun 2010 11:23:58 +0900 Subject: [PATCH] elisp hack for Hlint API. --- elisp/ghc-flymake.el | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/elisp/ghc-flymake.el b/elisp/ghc-flymake.el index 055d1e2..574550f 100644 --- a/elisp/ghc-flymake.el +++ b/elisp/ghc-flymake.el @@ -32,24 +32,19 @@ (let ((file (file-name-nondirectory (buffer-file-name)))) (list ghc-module-command (ghc-flymake-command file)))) -(defvar ghc-hlint (ghc-which "hlint")) - (defvar ghc-flymake-command nil) ;; nil: check, t: lint (defun ghc-flymake-command (file) (if ghc-flymake-command - (list "-f" ghc-hlint "lint" file) + (list "lint" file) (list "check" file))) (defun ghc-flymake-toggle-command () (interactive) - (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")))) + (setq ghc-flymake-command (not ghc-flymake-command)) + (if ghc-flymake-command + (message "Syntax check with hlint") + (message "Syntax check with GHC"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;