1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

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

This commit is contained in:
Paul Eggert 1993-07-29 04:58:47 +00:00
parent a0213a9717
commit e6258b339a

View File

@ -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))