aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel2005-02-07 20:38:46 +0000
committerAndré Spiegel2005-02-07 20:38:46 +0000
commit27707243715eef8de068908a5a9b5a8473dac848 (patch)
treec2b27b42d0f47307c72a0f3a0a62b2eb8392abe0
parentfc34503b5669539d585e4f8627a1fea2b3c5e320 (diff)
downloademacs-27707243715eef8de068908a5a9b5a8473dac848.tar.gz
emacs-27707243715eef8de068908a5a9b5a8473dac848.zip
(vc-make-version-backup): Ignore file-errors, e.g. directory not
writable.
-rw-r--r--lisp/vc-hooks.el11
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."
632 (unless (and (fboundp 'msdos-long-file-names) 632 (unless (and (fboundp 'msdos-long-file-names)
633 (not (with-no-warnings (msdos-long-file-names)))) 633 (not (with-no-warnings (msdos-long-file-names))))
634 (vc-delete-automatic-version-backups file) 634 (vc-delete-automatic-version-backups file)
635 (copy-file file (vc-version-backup-file-name file) 635 (condition-case nil
636 nil 'keep-date))) 636 (copy-file file (vc-version-backup-file-name file)
637 nil 'keep-date)
638 ;; It's ok if it doesn't work (e.g. directory not writable),
639 ;; since this is just for efficiency.
640 (file-error
641 (message
642 (concat "Warning: Cannot make version backup; "
643 "diff/revert therefore not local"))))))
637 644
638(defun vc-before-save () 645(defun vc-before-save ()
639 "Function to be called by `basic-save-buffer' (in files.el)." 646 "Function to be called by `basic-save-buffer' (in files.el)."