From b68b33375caeb82a4b3418d43c75bc8ccd43633a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 13 Jul 2012 15:06:09 +0800 Subject: Don't warn on toggle-read-only calls. Clarify the documentation of toggle-read-only, and audit the code tree for uses of toggle-read-only; where appropriate, switch to setting the variable buffer-read-only or calling toggle-read-only with a (new) second arg. * lisp/files.el (toggle-read-only): Doc fix and code cleanup. New arg to allow printing the message when called from Lisp. * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Remove toggle-read-only. * lisp/bindings.el (mode-line-toggle-read-only): * lisp/dired.el (dired-toggle-read-only): * lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call toggle-read-only with non-nil second arg. * lisp/bs.el (bs-toggle-readonly): * lisp/buff-menu.el (Buffer-menu-toggle-read-only): Remove with-no-warnings around toggle-read-only. * lisp/ffap.el (ffap--toggle-read-only): Accept a list of buffers. Remove with-no-warnings around toggle-read-only. (ffap-read-only, ffap-read-only-other-window) (ffap-read-only-other-frame): Callers changed. * lisp/help-mode.el: Don't require view package. (help-mode-finish): Set buffer-read-only instead of calling toggle-read-only. * lisp/emacs-lisp/eieio-custom.el (eieio-customize-object): * lisp/vc/ediff.el (ediff-set-read-only-in-buf-A): Set buffer-read-only directly. * lisp/gnus/smime.el (smime-certificate-info): Set buffer-read-only directly, instead of calling toggle-read-only with a (bogus) argument. * doc/emacs/buffers.texi (Misc Buffer): Document view-read-only. * doc/lispref/buffers.texi (Read Only Buffers): Document toggle-read-only changes. Reword to account for the fact that read-only is currently not supported in overlay properties. --- lisp/help-mode.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lisp/help-mode.el') diff --git a/lisp/help-mode.el b/lisp/help-mode.el index fa7d9b325db..7b6490b6b13 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -30,7 +30,6 @@ ;;; Code: (require 'button) -(require 'view) (eval-when-compile (require 'easymenu)) (defvar help-mode-map @@ -288,10 +287,7 @@ Commands: ;;;###autoload (defun help-mode-finish () (when (eq major-mode 'help-mode) - ;; View mode's read-only status of existing *Help* buffer is lost - ;; by with-output-to-temp-buffer. - (toggle-read-only 1) - + (setq buffer-read-only t) (save-excursion (goto-char (point-min)) (let ((inhibit-read-only t)) -- cgit v1.2.1