From: Glenn Morris Date: Fri, 24 Aug 2007 03:08:13 +0000 (+0000) Subject: Ulrich Mueller (tiny change) X-Git-Tag: emacs-pretest-23.0.90~11343 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb1f0d92c29e2465d1d18eaf3a7bbfcf8a8f0d6b;p=emacs.git Ulrich Mueller (tiny change) (backup-buffer-copy): Don't wrap delete in condition-case, only try to delete if file exists. --- diff --git a/lisp/files.el b/lisp/files.el index 614cad467ef..be3c53951c4 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3183,9 +3183,8 @@ BACKUPNAME is the backup file name, which is the old file renamed." (set-default-file-modes ?\700) (while (condition-case () (progn - (condition-case nil - (delete-file to-name) - (file-error nil)) + (and (file-exists-p to-name) + (delete-file to-name)) (copy-file from-name to-name nil t) nil) (file-already-exists t))