# HG changeset patch # User Eli Zaretskii # Date 1136548501 0 # Node ID df1975854c1c08ffd0811a859d08652af189f23f # Parent a4e1f58469e5d3dcb337b575a7584396e16c2141 (basic-save-buffer-2): If backing-up failed, reset buffer-backed-up to nil. diff -r a4e1f58469e5 -r df1975854c1c lisp/files.el --- 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)