From b1854d35cb839938a62c99bf3185a7ad173805d1 Mon Sep 17 00:00:00 2001 From: Andrey Kouznetsov Date: Wed, 26 Mar 2014 21:02:40 +0600 Subject: [PATCH] don't enable coffee-cos mode if buffer filename is nil --- modules/prelude-coffee.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/prelude-coffee.el b/modules/prelude-coffee.el index 90d881d..a369fed 100644 --- a/modules/prelude-coffee.el +++ b/modules/prelude-coffee.el @@ -58,8 +58,9 @@ (setq coffee-command "~/dev/coffee") ;; Compile '.coffee' files on every save - (and (file-exists-p (buffer-file-name)) - (file-exists-p (coffee-compiled-file-name)) + (and (buffer-file-name) + (file-exists-p (buffer-file-name)) + (file-exists-p (coffee-compiled-file-name (buffer-file-name))) (coffee-cos-mode t))) (setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)