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)