From 1309f6baff3a30f6fd708a9f976305212172df2a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 7 Jan 2017 02:53:02 -0500 Subject: [PATCH] modeline: add buffer-file-name check to *vc segment --- core/core-modeline.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-modeline.el b/core/core-modeline.el index d24725d52..f781cabde 100644 --- a/core/core-modeline.el +++ b/core/core-modeline.el @@ -238,7 +238,7 @@ directory, the file name, and its state (modified, read-only or non-existent)." (defun *vc () "Displays the current branch, colored based on its state." - (when vc-mode + (when (and vc-mode buffer-file-name) (let ((backend (vc-backend buffer-file-name)) (state (vc-state buffer-file-name)) (face 'mode-line-inactive)