From: Karl Heuer Date: Wed, 3 Jun 1998 14:37:00 +0000 (+0000) Subject: (toggle-read-only): When exiting View mode, locally X-Git-Tag: emacs-20.3~739 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca597f41ea26ecb93acf53b448b5a85e1931ec1b;p=emacs.git (toggle-read-only): When exiting View mode, locally set view-read-only to t so another toggle will re-enable View mode. --- 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))