don't check if the file does not exist.
This commit is contained in:
parent
04306d2ea7
commit
1c19d91813
@ -65,7 +65,8 @@ nil does not display errors/warnings.
|
|||||||
(defun ghc-check-syntax ()
|
(defun ghc-check-syntax ()
|
||||||
(interactive)
|
(interactive)
|
||||||
;; Only check syntax of visible buffers
|
;; 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
|
(with-timeout
|
||||||
(10 (error "ghc process may have hung or exited with an error"))
|
(10 (error "ghc process may have hung or exited with an error"))
|
||||||
(while ghc-process-running (sleep-for 0.1)))
|
(while ghc-process-running (sleep-for 0.1)))
|
||||||
|
Loading…
Reference in New Issue
Block a user