bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: backup-buffer-copy loops if old backup can't be deleted


From: Martin von Gagern
Subject: Re: backup-buffer-copy loops if old backup can't be deleted
Date: Tue, 21 Aug 2007 14:18:24 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070817)

Hi again!

There now is a patch to fix this, provided by Ulrich Mueller.
Original URL: http://bugs.gentoo.org/attachment.cgi?id=128742

=================== emacs-22.1-backup-buffer.patch ===================
--- emacs-22.1.orig/lisp/files.el  2007-05-25 14:43:31.000000000 +0200
+++ emacs-22.1/lisp/files.el       2007-08-21 08:26:36.000000000 +0200
@@ -3119,9 +3119,8 @@ backup-buffer-copy (from-name to-name modes)
          (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))
=============== end of  emacs-22.1-backup-buffer.patch ===============

Greetings,
 Martin von Gagern




reply via email to

[Prev in Thread] Current Thread [Next in Thread]