Commit ca597f41 authored by Karl Heuer's avatar Karl Heuer
Browse files

(toggle-read-only): When exiting View mode, locally

set view-read-only to t so another toggle will re-enable View mode.
parent 72b5cb89
......@@ -2413,7 +2413,9 @@ If visiting file read-only and `view-read-only' is non-nil, enter view mode."
nil) ; do nothing.
;; Toggle.
((and buffer-read-only view-mode)
(View-exit-and-edit)) ; Must leave view mode.
(View-exit-and-edit)
(make-local-variable 'view-read-only)
(setq view-read-only t)) ; Must leave view mode.
((and (not buffer-read-only) view-read-only
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment