Commit e6258b33 authored by Paul Eggert's avatar Paul Eggert
Browse files

(vc-mode-line): Set vc-mode to nil if FILE no longer is version-controlled.

parent a0213a97
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment