From: Paul Eggert Date: Thu, 29 Jul 1993 04:58:47 +0000 (+0000) Subject: (vc-mode-line): Set vc-mode to nil if FILE no longer is version-controlled. X-Git-Tag: emacs-19.34~11513 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6258b339a5f518894c8ddf87d478b9432a3d646;p=emacs.git (vc-mode-line): Set vc-mode to nil if FILE no longer is version-controlled. --- diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index e9b28f99cdb..31abfc02f6f 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -142,11 +142,11 @@ The value is set in the current buffer, which should be the buffer visiting FILE." (interactive (list buffer-file-name nil)) (let ((vc-type (vc-backend-deduce file))) - (if vc-type - (setq vc-mode - (concat " " (or label (symbol-name vc-type)) - (if (and vc-rcs-status (eq vc-type 'RCS)) - (vc-rcs-status file))))) + (setq vc-mode + (and vc-type + (concat " " (or label (symbol-name vc-type)) + (if (and vc-rcs-status (eq vc-type 'RCS)) + (vc-rcs-status file))))) ;; force update of mode line (set-buffer-modified-p (buffer-modified-p)) vc-type))