summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-hooks.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2012-06-30 15:14:00 +0200
committerMichael Albinus <michael.albinus@gmx.de>2012-06-30 15:14:00 +0200
commitac87de9763fbe6bf30fce7e85568a4195cf67ef5 (patch)
tree532e217fcaf8a416b4c840363a7761558964f091 /lisp/vc/vc-hooks.el
parent40c2a14362365474f50f2680235f4c000b2192b4 (diff)
downloademacs-ac87de9763fbe6bf30fce7e85568a4195cf67ef5.tar.gz
* vc/vc-hooks.el (vc-before-save): Clear cache if file has been
removed (likely outside Emacs).
Diffstat (limited to 'lisp/vc/vc-hooks.el')
-rw-r--r--lisp/vc/vc-hooks.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index dff49c26e4e..a753004d784 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -704,6 +704,8 @@ Before doing that, check if there are any old backups and get rid of them."
(let ((file buffer-file-name)
backend)
(ignore-errors ;Be careful not to prevent saving the file.
+ (unless (file-exists-p file)
+ (vc-file-clearprops file))
(and (setq backend (vc-backend file))
(vc-up-to-date-p file)
(eq (vc-checkout-model backend (list file)) 'implicit)