checking if (buffer-file-name) returns non-nil just in case.

This commit is contained in:
Kazu Yamamoto 2015-08-14 16:38:49 +09:00
parent 1c19d91813
commit 90061facb9

View File

@ -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"))