From: Richard M. Stallman Date: Mon, 11 Jan 1999 15:25:41 +0000 (+0000) Subject: (help-mode-finish): Renamed from help-mode-maybe. X-Git-Tag: emacs-20.4~901 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e48143f0fd269fca8332f0207549bf12ae9b95b2;p=emacs.git (help-mode-finish): Renamed from help-mode-maybe. Don't switch to Help mode here. (temp-buffer-setup-hook): Use help-mode-finish. (help-mode-setup): New function. (temp-buffer-setup-hook): Use help-mode-setup. --- diff --git a/lisp/help.el b/lisp/help.el index 2aef6283042..821e8e7e078 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -154,9 +154,13 @@ Commands: ;; `help-mode-maybe'. (run-hooks 'help-mode-hook)) -(defun help-mode-maybe () - (if (eq major-mode 'fundamental-mode) - (help-mode)) +(defun help-mode-setup () + (help-mode) + (setq buffer-read-only nil)) + +(add-hook 'temp-buffer-setup-hook 'help-mode-setup) + +(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. @@ -165,7 +169,7 @@ Commands: (setq view-return-to-alist (list (cons (selected-window) help-return-method)))) -(add-hook 'temp-buffer-show-hook 'help-mode-maybe) +(add-hook 'temp-buffer-show-hook 'help-mode-finish) (defun help-quit () "Just exit from the Help command's command loop."