[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 989937e: Revert "Make revert-buffer preserve buffer-readedness"

From: Lars Ingebrigtsen
Subject: master 989937e: Revert "Make revert-buffer preserve buffer-readedness"
Date: Tue, 27 Jul 2021 11:24:37 -0400 (EDT)

branch: master
commit 989937e1bc29ffec3835aee34c46479d25d0bf05
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Revert "Make revert-buffer preserve buffer-readedness"
    This reverts commit fcae435f598471a2911641412125c5ac4f73559f.
    This leads to problems when reverting from a file that's changed
    readedness externally.
 etc/NEWS      | 3 ---
 lisp/files.el | 4 +---
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index b969590..3513fa4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2827,9 +2827,6 @@ similar to prefix arguments, but are more flexible and 
 * 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:
diff --git a/lisp/files.el b/lisp/files.el
index 6088822..0bf866d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6364,9 +6364,7 @@ preserve markers and overlays, at the price of being 
   ;; 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)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]