From: Dmitry Gutov Date: Sat, 30 Jun 2012 13:14:00 +0000 (+0200) Subject: * vc/vc-hooks.el (vc-before-save): Clear cache if file has been X-Git-Tag: emacs-24.2.90~1199^2~277 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ac87de9763fbe6bf30fce7e85568a4195cf67ef5;p=emacs.git * vc/vc-hooks.el (vc-before-save): Clear cache if file has been removed (likely outside Emacs). --- 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)