summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2026-05-30 07:43:08 -0400
committerEli Zaretskii <eliz@gnu.org>2026-05-30 07:43:08 -0400
commitd70c646894addec51b4948425b4a3779f761317f (patch)
treec46729da383bb4dfd752abf78a07ae9cd002a930 /lisp
parenta2379402fc9d4aed342d85c171cbddea8be37862 (diff)
parent72d890c43e70477d496a9a0ef36a61357dde1023 (diff)
Merge from origin/emacs-31
72d890c43e7 ; Update the documentation of 'debug' 69fd4b87f4d Don't make buffer read-only when reverting if 'view-mode'... 2955b51e80c ; * etc/NEWS: Document the change in mode-line faces. # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/view.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/view.el b/lisp/view.el
index ec69699108a..4e2e1f54c76 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -464,6 +464,10 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
;; so that View mode stays off if read-only-mode is called.
(if (local-variable-p 'view-read-only)
(kill-local-variable 'view-read-only))
+ ;; Reset the read-only state memory as well, so that 'revert-buffer'
+ ;; won't make the buffer read-only again.
+ (if (local-variable-p 'read-only-mode--state)
+ (setq-local read-only-mode--state nil))
(if buffer-read-only
(setq buffer-read-only view-old-buffer-read-only)))