diff options
author | Richard M. Stallman <rms@gnu.org> | 2000-03-19 15:56:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2000-03-19 15:56:40 +0000 |
commit | b75c9917dfffa2da2f97c4e3f8ffa4753dfab06e (patch) | |
tree | 51106638753aaacc0010ca537329a54b17fbb142 | |
parent | e53ae11c20200389982561f9ab6389935ef5af52 (diff) | |
download | emacs-b75c9917dfffa2da2f97c4e3f8ffa4753dfab06e.tar.gz |
(view-mode-disable): Kill local binding of view-read-only.
-rw-r--r-- | lisp/view.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/view.el b/lisp/view.el index e6024601679..e57ac270b18 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -458,6 +458,14 @@ Entry to view-mode runs the normal hook `view-mode-hook'." (remove-hook 'change-major-mode-hook 'view-mode-disable t) (and view-overlay (delete-overlay view-overlay)) (force-mode-line-update) + ;; Calling toggle-read-only while View mode is enabled + ;; sets view-read-only to t as a buffer-local variable + ;; after exiting View mode. That arranges that the next toggle-read-only + ;; will reenable View mode. + ;; Cancelling View mode in any other way should cancel that, too, + ;; so that View mode stays off if toggle-read-only is called. + (if (local-variable-p 'view-read-only) + (kill-local-variable 'view-read-only)) (setq view-mode nil Helper-return-blurb view-old-Helper-return-blurb) (if buffer-read-only |