bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vc-find-file-hook should set vc-mode to nil


From: Jonathan Kamens
Subject: vc-find-file-hook should set vc-mode to nil
Date: Wed, 9 Jan 2002 21:21:14 -0500

vc-find-file-hook should set vc-mode to nil, if it's set, before doing
anything else.  Otherwise, if a file's VC state changes out from under
Emacs, and the user runs M-x revert-buffer, the mode line won't update
to indicate that Emacs has noticed that the file is no longer under
version control.  Here's a patch:

Index: vc-hooks.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.137
diff -u -r1.137 vc-hooks.el
--- vc-hooks.el 14 Dec 2001 07:58:33 -0000      1.137
+++ vc-hooks.el 10 Jan 2002 02:20:58 -0000
@@ -610,6 +610,8 @@
   "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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]