From: Konstantin Kharlamov Date: Thu, 5 Aug 2021 15:25:56 +0000 (+0300) Subject: Reset mtime of a buffer reverted "delicately" X-Git-Tag: emacs-28.0.90~1591^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4ec10c80abfc985efa9707e5129b4cb5612d6582;p=emacs.git Reset mtime of a buffer reverted "delicately" * lisp/files.el (revert-buffer-insert-file-contents-delicately): Once buffer is reverted, reset its mtime to that of the file. (Bug#49893) --- diff --git a/lisp/files.el b/lisp/files.el index 2b13d04bcbe..c2607956915 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6533,7 +6533,8 @@ see `replace-buffer-contents'." ;; See comments in revert-buffer-with-fine-grain for an explanation. (defun revert-buffer-with-fine-grain-success-p () success)) - (set-buffer-modified-p nil)))) + (set-buffer-modified-p nil) + (set-visited-file-modtime)))) (defun revert-buffer-with-fine-grain (&optional ignore-auto noconfirm) "Revert buffer preserving markers, overlays, etc.