From 1dc2755a716e15ac6b21d1f070346954d58018ef Mon Sep 17 00:00:00 2001
From: Chong Yidong <cyd@gnu.org>
Date: Mon, 29 Oct 2012 19:12:17 +0800
Subject: [PATCH] * vc/vc-hooks.el (vc-file-clearprops): Kill vc-parent-buffer.
 Suggested by Dan Nicolaescu.

Fixes: debbugs:6326
---
 lisp/ChangeLog      | 3 +++
 lisp/vc/vc-hooks.el | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4edf3cdd03b..db12be1301f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2012-10-29  Chong Yidong  <cyd@gnu.org>
 
+	* vc/vc-hooks.el (vc-file-clearprops): Kill vc-parent-buffer.
+	Suggested by Dan Nicolaescu (Bug#6326).
+
 	* info.el (Info-complete-menu-item): Avoid duplicates (Bug#12705).
 
 	* startup.el (fancy-about-screen): Don't message (Bug#12680).
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index cac3eb559a1..07a292ae435 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -224,6 +224,8 @@ VC commands are globally reachable under the prefix `\\[vc-prefix-map]':
 
 (defun vc-file-clearprops (file)
   "Clear all VC properties of FILE."
+  (if (boundp 'vc-parent-buffer)
+      (kill-local-variable 'vc-parent-buffer))
   (setplist (intern file vc-file-prop-obarray) nil))
 
 
-- 
2.39.5