From: Lars Ingebrigtsen Date: Fri, 30 Jul 2021 12:07:04 +0000 (+0200) Subject: Ensure that recover-file doesn't leave stale auto-save files behind X-Git-Tag: emacs-28.0.90~1648 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16876744d44b07ab9486fcea388254b9b8f617a5;p=emacs.git 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). --- diff --git a/lisp/files.el b/lisp/files.el index 0bf866d0ece..2b13d04bcbe 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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")))))