* vc/vc-hooks.el (vc-before-save): Clear cache if file has been

removed (likely outside Emacs).
This commit is contained in:
Dmitry Gutov 2012-06-30 15:14:00 +02:00 committed by Michael Albinus
parent 40c2a14362
commit ac87de9763
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-06-30 Dmitry Gutov <dgutov@yandex.ru>
* vc/vc-hooks.el (vc-before-save): Clear cache if file has been
removed (likely outside Emacs).
2012-06-30 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-lib.el: Require macroexp for its macros.

View file

@ -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)