]> code.delx.au - gnu-emacs/commitdiff
* vc/vc-hooks.el (vc-before-save): Clear cache if file has been
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 30 Jun 2012 13:14:00 +0000 (15:14 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 30 Jun 2012 13:14:00 +0000 (15:14 +0200)
removed (likely outside Emacs).

lisp/ChangeLog
lisp/vc/vc-hooks.el

index 15bc9720be9de83877e4e1a124d76cf1f857fd95..d92783e03b0617f6ddd8e2e485b5f12f2d39f303 100644 (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.
index dff49c26e4ed29efa5cb8832acbc7eabb269bd3b..a753004d7844ab5155f47cea5aeff0f947dea421 100644 (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)