summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2002-02-21 20:56:58 +0000
committerAndré Spiegel <spiegel@gnu.org>2002-02-21 20:56:58 +0000
commit060a1456cee6bbd23778c3428c9fe61dcb500fb4 (patch)
tree04a1c520e541c3e8f5eac02bda5f481cc8ca6656 /lisp/vc-hooks.el
parentaced8001aad9c74fcffbdca789c46740cfde8114 (diff)
downloademacs-060a1456cee6bbd23778c3428c9fe61dcb500fb4.tar.gz
Patch by Jonathan Kamens <jik@kamens.brookline.ma.us>.
(vc-mode-line): Set vc-mode to nil if the file is not version-controlled. This is necessary, e.g., if the file has just been reverted, and thus was previously under version control but isn't any longer. (vc-find-file-hook): Likewise.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 44ccf43889f..5840491fa0f 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-hooks.el,v 1.136 2001/12/11 07:35:18 pj Exp $
+;; $Id: vc-hooks.el,v 1.137 2001/12/14 07:58:33 spiegel Exp $
;; This file is part of GNU Emacs.
@@ -544,7 +544,8 @@ Before doing that, check if there are any old backups and get rid of them."
The value is set in the current buffer, which should be the buffer
visiting FILE."
(interactive (list buffer-file-name))
- (unless (not (vc-backend file))
+ (if (not (vc-backend file))
+ (setq vc-mode nil)
(setq vc-mode (concat " " (if vc-display-status
(vc-call mode-line-string file)
(symbol-name (vc-backend file)))))
@@ -610,6 +611,8 @@ current, and kill the buffer that visits the link."
"Function for `find-file-hooks' activating VC mode if appropriate."
;; Recompute whether file is version controlled,
;; if user has killed the buffer and revisited.
+ (if vc-mode
+ (setq vc-mode nil))
(when buffer-file-name
(vc-file-clearprops buffer-file-name)
(cond