diff options
| author | Karl Heuer | 1997-10-15 23:36:30 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-15 23:36:30 +0000 |
| commit | 21de5941c9b67f22a3d48350f483d2170ff8bd05 (patch) | |
| tree | 1262a538c6db00ce5860b084fc760f8af2853c59 | |
| parent | 355345fd1ae7f6fd330bb5216d66f6ca476959cf (diff) | |
| download | emacs-21de5941c9b67f22a3d48350f483d2170ff8bd05.tar.gz emacs-21de5941c9b67f22a3d48350f483d2170ff8bd05.zip | |
(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.
| -rw-r--r-- | lisp/help.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/help.el b/lisp/help.el index 867ab33a5af..23901132b05 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -127,6 +127,12 @@ Commands: | |||
| 127 | (setq view-no-disable-on-exit t) | 127 | (setq view-no-disable-on-exit t) |
| 128 | (run-hooks 'help-mode-hook)) | 128 | (run-hooks 'help-mode-hook)) |
| 129 | 129 | ||
| 130 | (defun help-mode-maybe () | ||
| 131 | (if (eq major-mode 'fundamental-mode) | ||
| 132 | (help-mode))) | ||
| 133 | |||
| 134 | (add-hook 'temp-buffer-show-hook 'help-mode-maybe) | ||
| 135 | |||
| 130 | (defun help-quit () | 136 | (defun help-quit () |
| 131 | (interactive) | 137 | (interactive) |
| 132 | nil) | 138 | nil) |
| @@ -289,9 +295,6 @@ If FUNCTION is nil, applies `message' to it, thus printing it." | |||
| 289 | (progn (terpri) | 295 | (progn (terpri) |
| 290 | (princ doc)) | 296 | (princ doc)) |
| 291 | (princ "not documented"))) | 297 | (princ "not documented"))) |
| 292 | (save-excursion | ||
| 293 | (set-buffer standard-output) | ||
| 294 | (help-mode)) | ||
| 295 | (print-help-return-message))))))) | 298 | (print-help-return-message))))))) |
| 296 | 299 | ||
| 297 | (defun describe-mode () | 300 | (defun describe-mode () |
| @@ -334,9 +337,6 @@ followed by the major mode, which is described on the last page.\n\f\n")) | |||
| 334 | (princ mode-name) | 337 | (princ mode-name) |
| 335 | (princ " mode:\n") | 338 | (princ " mode:\n") |
| 336 | (princ (documentation major-mode)) | 339 | (princ (documentation major-mode)) |
| 337 | (save-excursion | ||
| 338 | (set-buffer standard-output) | ||
| 339 | (help-mode)) | ||
| 340 | (print-help-return-message))) | 340 | (print-help-return-message))) |
| 341 | 341 | ||
| 342 | ;; So keyboard macro definitions are documented correctly | 342 | ;; So keyboard macro definitions are documented correctly |
| @@ -416,8 +416,7 @@ of the key sequence that ran this command." | |||
| 416 | (goto-char (point-min)) | 416 | (goto-char (point-min)) |
| 417 | (while (progn (move-to-column 50) (not (eobp))) | 417 | (while (progn (move-to-column 50) (not (eobp))) |
| 418 | (search-forward " " nil t) | 418 | (search-forward " " nil t) |
| 419 | (insert "\n")) | 419 | (insert "\n"))) |
| 420 | (help-mode)) | ||
| 421 | (print-help-return-message))) | 420 | (print-help-return-message))) |
| 422 | 421 | ||
| 423 | (defalias 'help 'help-for-help) | 422 | (defalias 'help 'help-for-help) |
| @@ -583,7 +582,6 @@ C-w Display information on absence of warranty for GNU Emacs." | |||
| 583 | (print-help-return-message) | 582 | (print-help-return-message) |
| 584 | (save-excursion | 583 | (save-excursion |
| 585 | (set-buffer standard-output) | 584 | (set-buffer standard-output) |
| 586 | (help-mode) | ||
| 587 | ;; Return the text we displayed. | 585 | ;; Return the text we displayed. |
| 588 | (buffer-string))) | 586 | (buffer-string))) |
| 589 | (message "You didn't specify a function"))) | 587 | (message "You didn't specify a function"))) |
| @@ -661,7 +659,6 @@ Returns the documentation as a string, also." | |||
| 661 | (print-help-return-message) | 659 | (print-help-return-message) |
| 662 | (save-excursion | 660 | (save-excursion |
| 663 | (set-buffer standard-output) | 661 | (set-buffer standard-output) |
| 664 | (help-mode) | ||
| 665 | ;; Return the text we displayed. | 662 | ;; Return the text we displayed. |
| 666 | (buffer-string)))) | 663 | (buffer-string)))) |
| 667 | (message "You did not specify a variable"))) | 664 | (message "You did not specify a variable"))) |