]> git.eshelyaron.com Git - emacs.git/commitdiff
Reset mtime of a buffer reverted "delicately"
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>
Thu, 5 Aug 2021 15:25:56 +0000 (18:25 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 5 Aug 2021 17:45:02 +0000 (20:45 +0300)
* lisp/files.el (revert-buffer-insert-file-contents-delicately):
Once buffer is reverted, reset its mtime to that of the file.
(Bug#49893)

lisp/files.el

index 2b13d04bcbef0a77bfec46c3cdebf5c695bd10fd..c26079569156c65380b83401405eea4ac521b262 100644 (file)
@@ -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.