changeset 22338:746adedbb6ba

(toggle-read-only): When exiting View mode, locally set view-read-only to t so another toggle will re-enable View mode.
author Karl Heuer <kwzh@gnu.org>
date Wed, 03 Jun 1998 14:37:00 +0000
parents ce89ab9c000e
children 69de59462e22
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Wed Jun 03 14:35:38 1998 +0000
+++ b/lisp/files.el	Wed Jun 03 14:37:00 1998 +0000
@@ -2413,7 +2413,9 @@
     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))