# HG changeset patch # User Andr Spiegel # Date 1107808726 0 # Node ID c3afd6e6c99217e3abcc5056a98d9f67e5a4556a # Parent a75c643392b8c2a9f33e7f47f36386e4e5587b4e (vc-make-version-backup): Ignore file-errors, e.g. directory not writable. diff -r a75c643392b8 -r c3afd6e6c992 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Mon Feb 07 20:00:31 2005 +0000 +++ b/lisp/vc-hooks.el Mon Feb 07 20:38:46 2005 +0000 @@ -632,8 +632,15 @@ (unless (and (fboundp 'msdos-long-file-names) (not (with-no-warnings (msdos-long-file-names)))) (vc-delete-automatic-version-backups file) - (copy-file file (vc-version-backup-file-name file) - nil 'keep-date))) + (condition-case nil + (copy-file file (vc-version-backup-file-name file) + nil 'keep-date) + ;; It's ok if it doesn't work (e.g. directory not writable), + ;; since this is just for efficiency. + (file-error + (message + (concat "Warning: Cannot make version backup; " + "diff/revert therefore not local")))))) (defun vc-before-save () "Function to be called by `basic-save-buffer' (in files.el)."