checking if (buffer-file-name) returns non-nil just in case.
This commit is contained in:
parent
1c19d91813
commit
90061facb9
@ -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 (and (file-exists-p (buffer-file-name))
|
(when (and (buffer-file-name)
|
||||||
|
(file-exists-p (buffer-file-name))
|
||||||
(get-buffer-window (current-buffer) t))
|
(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"))
|
||||||
|
Loading…
Reference in New Issue
Block a user