summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-20 23:36:37 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-20 23:36:37 +0000
commit1700f41d2005d62589a473df0bf44d4d81c7ec6e (patch)
tree69737fa80fd2d50b12523ef800ebc659f5ba8a08 /lisp/help-mode.el
parent505847d46117471a429df6ff483db0a029fbafb0 (diff)
downloademacs-1700f41d2005d62589a473df0bf44d4d81c7ec6e.tar.gz
(help-mode): Undo 2001-10-07 change.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 4e94af1b8ed..b3ca86f411d 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -60,7 +60,10 @@ The format is (FUNCTION ARGS...).")
(setq-default help-xref-stack nil help-xref-stack-item nil)
-
+(defcustom help-mode-hook nil
+ "Hook run by `help-mode'."
+ :type 'hook
+ :group 'help)
;; Button types used by help
@@ -137,15 +140,22 @@ The format is (FUNCTION ARGS...).")
;;;###autoload
-(define-derived-mode help-mode nil "Help"
+(defun help-mode ()
"Major mode for viewing help text and navigating references in it.
Entry to this mode runs the normal hook `help-mode-hook'.
Commands:
\\{help-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map help-mode-map)
+ (setq mode-name "Help")
+ (setq major-mode 'help-mode)
+ (make-local-variable 'font-lock-defaults)
(setq font-lock-defaults nil) ; font-lock would defeat xref
(view-mode)
(make-local-variable 'view-no-disable-on-exit)
- (setq view-no-disable-on-exit t))
+ (setq view-no-disable-on-exit t)
+ (run-hooks 'help-mode-hook))
;;;###autoload
(defun help-mode-setup ()