]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Make revert-buffer preserve buffer-readedness"
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Jul 2021 15:23:32 +0000 (17:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Jul 2021 15:24:14 +0000 (17:24 +0200)
This reverts commit fcae435f598471a2911641412125c5ac4f73559f.

This leads to problems when reverting from a file that's changed
readedness externally.

etc/NEWS
lisp/files.el

index b969590f7c3ce5329a54151a733802597fec3a63..3513fa4d64295ca493430252c430b8c837823e86 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2827,9 +2827,6 @@ similar to prefix arguments, but are more flexible and discoverable.
 \f
 * Incompatible Editing Changes in Emacs 28.1
 
-** 'revert-buffer' will now preserve buffer-readedness.
-It previously switched the read-only flag off.
-
 ** 'electric-indent-mode' now also indents inside strings and comments,
 (unless the indentation function doesn't, of course).
 To recover the previous behavior you can use:
index 608882268655d29402ef4ffb4897ac00883f06cc..0bf866d0eceafbe0ece5004c03d665fa09ff5614 100644 (file)
@@ -6364,9 +6364,7 @@ preserve markers and overlays, at the price of being slower."
   ;; interface, but leaving the programmatic interface the same.
   (interactive (list (not current-prefix-arg)))
   (let ((revert-buffer-in-progress-p t)
-        (revert-buffer-preserve-modes preserve-modes)
-        ;; Preserve buffer-readedness.
-        (buffer-read-only buffer-read-only))
+        (revert-buffer-preserve-modes preserve-modes))
     (funcall (or revert-buffer-function #'revert-buffer--default)
              ignore-auto noconfirm)))