changeset 24048:1876f867ff95

(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.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Jan 1999 15:25:41 +0000
parents 5063ba89c767
children a45f10911408
files lisp/help.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Mon Jan 11 14:01:41 1999 +0000
+++ b/lisp/help.el	Mon Jan 11 15:25:41 1999 +0000
@@ -154,9 +154,13 @@
   ;; `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 @@
   (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."