don't check if the file does not exist.

This commit is contained in:
Kazu Yamamoto 2015-08-14 16:22:57 +09:00
parent 04306d2ea7
commit 1c19d91813
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ nil does not display errors/warnings.
(defun ghc-check-syntax ()
(interactive)
;; Only check syntax of visible buffers
(when (get-buffer-window (current-buffer) t)
(when (and (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)))