From e23e68279321e719b273f90fb1b7f6aed10cc534 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 31 Aug 2015 14:13:52 +0900 Subject: [PATCH] Revert "Serialize check-syntax" (#567) This reverts commit 3bf4243bafc2c5713da6c63851e1a2d0a206d768. --- elisp/ghc-check.el | 10 +++------- elisp/ghc.el | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) 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))