changeset 68063:df1975854c1c

(basic-save-buffer-2): If backing-up failed, reset buffer-backed-up to nil.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 06 Jan 2006 11:55:01 +0000
parents a4e1f58469e5
children 31456bd23800
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Jan 06 10:56:12 2006 +0000
+++ b/lisp/files.el	Fri Jan 06 11:55:01 2006 +0000
@@ -3469,7 +3469,9 @@
 	    ;; If we get an error writing the new file, and we made
 	    ;; the backup by renaming, undo the backing-up.
 	    (and setmodes (not success)
-		 (rename-file (cdr setmodes) buffer-file-name))))))
+		 (progn
+		   (rename-file (cdr setmodes) buffer-file-name t)
+		   (setq buffer-backed-up nil)))))))
     setmodes))
 
 (defun diff-buffer-with-file (&optional buffer)