From ac87de9763fbe6bf30fce7e85568a4195cf67ef5 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 30 Jun 2012 15:14:00 +0200 Subject: [PATCH] * vc/vc-hooks.el (vc-before-save): Clear cache if file has been removed (likely outside Emacs). --- lisp/ChangeLog | 5 +++++ lisp/vc/vc-hooks.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15bc9720be9..d92783e03b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-30 Dmitry Gutov + + * vc/vc-hooks.el (vc-before-save): Clear cache if file has been + removed (likely outside Emacs). + 2012-06-30 Stefan Monnier * emacs-lisp/cl-lib.el: Require macroexp for its macros. 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) -- 2.11.4.GIT