Mercurial > emacs
comparison lisp/vc-hooks.el @ 4338:0e9960f5e99c
(vc-mode-line): Set vc-mode to nil if FILE no longer is version-controlled.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Thu, 29 Jul 1993 04:58:47 +0000 |
parents | 52d82c1a3948 |
children | 604a401e05a4 |
comparison
equal
deleted
inserted
replaced
4337:cda282328afd | 4338:0e9960f5e99c |
---|---|
140 "Set `vc-mode' to display type of version control for FILE. | 140 "Set `vc-mode' to display type of version control for FILE. |
141 The value is set in the current buffer, which should be the buffer | 141 The value is set in the current buffer, which should be the buffer |
142 visiting FILE." | 142 visiting FILE." |
143 (interactive (list buffer-file-name nil)) | 143 (interactive (list buffer-file-name nil)) |
144 (let ((vc-type (vc-backend-deduce file))) | 144 (let ((vc-type (vc-backend-deduce file))) |
145 (if vc-type | 145 (setq vc-mode |
146 (setq vc-mode | 146 (and vc-type |
147 (concat " " (or label (symbol-name vc-type)) | 147 (concat " " (or label (symbol-name vc-type)) |
148 (if (and vc-rcs-status (eq vc-type 'RCS)) | 148 (if (and vc-rcs-status (eq vc-type 'RCS)) |
149 (vc-rcs-status file))))) | 149 (vc-rcs-status file))))) |
150 ;; force update of mode line | 150 ;; force update of mode line |
151 (set-buffer-modified-p (buffer-modified-p)) | 151 (set-buffer-modified-p (buffer-modified-p)) |
152 vc-type)) | 152 vc-type)) |
153 | 153 |
154 (defun vc-rcs-status (file) | 154 (defun vc-rcs-status (file) |