From 90061facb9a2a0901a77b265c97efaaf51d4e940 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 14 Aug 2015 16:38:49 +0900 Subject: [PATCH] checking if (buffer-file-name) returns non-nil just in case. --- elisp/ghc-check.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index d9270ba..dad5416 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -65,7 +65,8 @@ nil does not display errors/warnings. (defun ghc-check-syntax () (interactive) ;; 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)) (with-timeout (10 (error "ghc process may have hung or exited with an error"))