mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Don't make buffer read-only when reverting if 'view-mode' was disabled
* lisp/view.el (view--disable): Reset 'read-only-mode--state'. (Bug#81149)
This commit is contained in:
parent
2955b51e80
commit
69fd4b87f4
1 changed files with 4 additions and 0 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue