]> code.delx.au - gnu-emacs/commitdiff
Ulrich Mueller <ulm at gentoo.org> (tiny change)
authorGlenn Morris <rgm@gnu.org>
Fri, 24 Aug 2007 03:08:13 +0000 (03:08 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 24 Aug 2007 03:08:13 +0000 (03:08 +0000)
(backup-buffer-copy): Don't wrap delete in condition-case, only try to
delete if file exists.

lisp/files.el

index 614cad467ef77527c2b516311c6af377594fa6d7..be3c53951c47bd771d016fd6bb0525737e23dd2f 100644 (file)
@@ -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))