diff options
author | André Spiegel <spiegel@gnu.org> | 2005-02-07 20:38:46 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 2005-02-07 20:38:46 +0000 |
commit | 27707243715eef8de068908a5a9b5a8473dac848 (patch) | |
tree | c2b27b42d0f47307c72a0f3a0a62b2eb8392abe0 /lisp/vc-hooks.el | |
parent | fc34503b5669539d585e4f8627a1fea2b3c5e320 (diff) | |
download | emacs-27707243715eef8de068908a5a9b5a8473dac848.tar.gz |
(vc-make-version-backup): Ignore file-errors, e.g. directory not
writable.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r-- | lisp/vc-hooks.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 2dc8e1533f0..bdff9fbe12c 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -632,8 +632,15 @@ Before doing that, check if there are any old backups and get rid of them." (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)." |