parent
393095005f
commit
e23e682793
@ -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 " -:-")))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user