How about this:
(defun revert-to-backup ()
"Reverts to the latest backup file associated with the current buffer."
(interactive)
(let ((file (buffer-file-name)))
(when file
(let ((bak (file-newest-backup (buffer-file-name))))
(if bak
(progn
(finddelete-alternateregion (point-filemin) bak(point-max))
(set-visitedinsert-file-namecontents filebak))
(message "No backups found!"))))))
With this command you can revert the current buffer to its latest backup. The revert is not saved automatically, I'm assuming you might want to at least look at the content before hitting C-x C-s
to save.