1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00

Ensure that recover-file doesn't leave stale auto-save files behind

* lisp/files.el (recover-file): Don't leave stale auto-save files
behind after crash recovery (bug#11331).
This commit is contained in:
Lars Ingebrigtsen 2021-07-30 14:07:04 +02:00
parent 2ece0f8d3c
commit 16876744d4

View File

@ -6615,7 +6615,8 @@ details on the arguments, see `revert-buffer'."
(coding-system-for-read 'auto-save-coding))
(erase-buffer)
(insert-file-contents file-name nil)
(set-buffer-file-coding-system coding-system))
(set-buffer-file-coding-system coding-system)
(set-buffer-auto-saved))
(after-find-file nil nil t))
(t (user-error "Recover-file canceled")))))