emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/help-mode.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/help-mode.el
Date: Tue, 20 Nov 2001 18:36:37 -0500

Index: emacs/lisp/help-mode.el
diff -u emacs/lisp/help-mode.el:1.5 emacs/lisp/help-mode.el:1.6
--- emacs/lisp/help-mode.el:1.5 Fri Nov  2 00:49:48 2001
+++ emacs/lisp/help-mode.el     Tue Nov 20 18:36:37 2001
@@ -60,7 +60,10 @@
 
 (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 @@
 
 
 ;;;###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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]