# HG changeset patch # User Karl Heuer # Date 876958590 0 # Node ID 36044c8b8aef1d96873ec53e14939483f2453911 # Parent 121625bee1c8a83221b293d4dde29cd8b165f261 (help-mode-maybe): New function, on temp-buffer-show-hook. (describe-key, describe-mode): Don't call help-mode here. (view-lossage, describe-function, describe-variable): Likewise. diff -r 121625bee1c8 -r 36044c8b8aef lisp/help.el --- a/lisp/help.el Wed Oct 15 23:34:58 1997 +0000 +++ b/lisp/help.el Wed Oct 15 23:36:30 1997 +0000 @@ -127,6 +127,12 @@ (setq view-no-disable-on-exit t) (run-hooks 'help-mode-hook)) +(defun help-mode-maybe () + (if (eq major-mode 'fundamental-mode) + (help-mode))) + +(add-hook 'temp-buffer-show-hook 'help-mode-maybe) + (defun help-quit () (interactive) nil) @@ -289,9 +295,6 @@ (progn (terpri) (princ doc)) (princ "not documented"))) - (save-excursion - (set-buffer standard-output) - (help-mode)) (print-help-return-message))))))) (defun describe-mode () @@ -334,9 +337,6 @@ (princ mode-name) (princ " mode:\n") (princ (documentation major-mode)) - (save-excursion - (set-buffer standard-output) - (help-mode)) (print-help-return-message))) ;; So keyboard macro definitions are documented correctly @@ -416,8 +416,7 @@ (goto-char (point-min)) (while (progn (move-to-column 50) (not (eobp))) (search-forward " " nil t) - (insert "\n")) - (help-mode)) + (insert "\n"))) (print-help-return-message))) (defalias 'help 'help-for-help) @@ -583,7 +582,6 @@ (print-help-return-message) (save-excursion (set-buffer standard-output) - (help-mode) ;; Return the text we displayed. (buffer-string))) (message "You didn't specify a function"))) @@ -661,7 +659,6 @@ (print-help-return-message) (save-excursion (set-buffer standard-output) - (help-mode) ;; Return the text we displayed. (buffer-string)))) (message "You did not specify a variable")))