From ca597f41ea26ecb93acf53b448b5a85e1931ec1b Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 3 Jun 1998 14:37:00 +0000 Subject: [PATCH] (toggle-read-only): When exiting View mode, locally set view-read-only to t so another toggle will re-enable View mode. --- lisp/files.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 51a29e47408..82b109b04fa 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)) -- 2.39.2