diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index 4b85773..f795c58 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -66,14 +66,10 @@ nil do not display errors/warnings. (interactive) ;; Only check syntax of visible buffers (when (and (buffer-file-name) - (file-exists-p (buffer-file-name)) - (get-buffer-window (current-buffer) t)) - (with-timeout - (10 (error "ghc process may have hung or exited with an error")) - (while ghc-process-running (sleep-for 0.1))) + (file-exists-p (buffer-file-name))) (ghc-with-process (ghc-check-send) - 'ghc-check-callback - (lambda () (setq mode-line-process " -:-"))))) + 'ghc-check-callback + (lambda () (setq mode-line-process " -:-"))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/elisp/ghc.el b/elisp/ghc.el index 0c4f967..d1d7e1d 100644 --- a/elisp/ghc.el +++ b/elisp/ghc.el @@ -119,9 +119,6 @@ (setq ghc-initialized t) (defadvice save-buffer (after ghc-check-syntax-on-save activate) "Check syntax with GHC when a haskell-mode buffer is saved." - (when (eq 'haskell-mode major-mode) (ghc-check-syntax))) - (defadvice switch-to-buffer (after ghc-check-syntax-on-switch-to-buffer activate) - "Check syntax with GHC when switching to a haskell-mode buffer." (when (eq 'haskell-mode major-mode) (ghc-check-syntax)))) (ghc-import-module) (ghc-check-syntax))