comparison lisp/files.el @ 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 326aa30a47b8
children e08826f8b714 8438f5473d99 7beb78bc1f8e
comparison
equal deleted inserted replaced
68062:a4e1f58469e5 68063:df1975854c1c
3467 buffer-file-name nil t buffer-file-truename) 3467 buffer-file-name nil t buffer-file-truename)
3468 (setq success t)) 3468 (setq success t))
3469 ;; If we get an error writing the new file, and we made 3469 ;; If we get an error writing the new file, and we made
3470 ;; the backup by renaming, undo the backing-up. 3470 ;; the backup by renaming, undo the backing-up.
3471 (and setmodes (not success) 3471 (and setmodes (not success)
3472 (rename-file (cdr setmodes) buffer-file-name)))))) 3472 (progn
3473 (rename-file (cdr setmodes) buffer-file-name t)
3474 (setq buffer-backed-up nil)))))))
3473 setmodes)) 3475 setmodes))
3474 3476
3475 (defun diff-buffer-with-file (&optional buffer) 3477 (defun diff-buffer-with-file (&optional buffer)
3476 "View the differences between BUFFER and its associated file. 3478 "View the differences between BUFFER and its associated file.
3477 This requires the external program `diff' to be in your `exec-path'." 3479 This requires the external program `diff' to be in your `exec-path'."