From bf935c5741506ae0ced8b7dd8ae3ccf8b2d43303 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Thu, 27 Mar 2014 12:27:09 +0900 Subject: [PATCH] don't save the buffer for hlint. --- elisp/ghc-command.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/elisp/ghc-command.el b/elisp/ghc-command.el index 342796d..0766750 100644 --- a/elisp/ghc-command.el +++ b/elisp/ghc-command.el @@ -84,8 +84,11 @@ (defun ghc-save-buffer () (interactive) ;; fixme: better way then saving? - (set-buffer-modified-p t) - (call-interactively 'save-buffer) + (if ghc-check-command ;; hlint + (if (buffer-modified-p) + (call-interactively 'save-buffer)) + (set-buffer-modified-p t) + (call-interactively 'save-buffer)) (ghc-check-syntax)) (provide 'ghc-command)