mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-17 10:06:13 +00:00
(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.
This commit is contained in:
parent
355345fd1a
commit
21de5941c9
17
lisp/help.el
17
lisp/help.el
@ -127,6 +127,12 @@ Commands:
|
|||||||
(setq view-no-disable-on-exit t)
|
(setq view-no-disable-on-exit t)
|
||||||
(run-hooks 'help-mode-hook))
|
(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 ()
|
(defun help-quit ()
|
||||||
(interactive)
|
(interactive)
|
||||||
nil)
|
nil)
|
||||||
@ -289,9 +295,6 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
|
|||||||
(progn (terpri)
|
(progn (terpri)
|
||||||
(princ doc))
|
(princ doc))
|
||||||
(princ "not documented")))
|
(princ "not documented")))
|
||||||
(save-excursion
|
|
||||||
(set-buffer standard-output)
|
|
||||||
(help-mode))
|
|
||||||
(print-help-return-message)))))))
|
(print-help-return-message)))))))
|
||||||
|
|
||||||
(defun describe-mode ()
|
(defun describe-mode ()
|
||||||
@ -334,9 +337,6 @@ followed by the major mode, which is described on the last page.\n\f\n"))
|
|||||||
(princ mode-name)
|
(princ mode-name)
|
||||||
(princ " mode:\n")
|
(princ " mode:\n")
|
||||||
(princ (documentation major-mode))
|
(princ (documentation major-mode))
|
||||||
(save-excursion
|
|
||||||
(set-buffer standard-output)
|
|
||||||
(help-mode))
|
|
||||||
(print-help-return-message)))
|
(print-help-return-message)))
|
||||||
|
|
||||||
;; So keyboard macro definitions are documented correctly
|
;; So keyboard macro definitions are documented correctly
|
||||||
@ -416,8 +416,7 @@ of the key sequence that ran this command."
|
|||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (progn (move-to-column 50) (not (eobp)))
|
(while (progn (move-to-column 50) (not (eobp)))
|
||||||
(search-forward " " nil t)
|
(search-forward " " nil t)
|
||||||
(insert "\n"))
|
(insert "\n")))
|
||||||
(help-mode))
|
|
||||||
(print-help-return-message)))
|
(print-help-return-message)))
|
||||||
|
|
||||||
(defalias 'help 'help-for-help)
|
(defalias 'help 'help-for-help)
|
||||||
@ -583,7 +582,6 @@ C-w Display information on absence of warranty for GNU Emacs."
|
|||||||
(print-help-return-message)
|
(print-help-return-message)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(set-buffer standard-output)
|
(set-buffer standard-output)
|
||||||
(help-mode)
|
|
||||||
;; Return the text we displayed.
|
;; Return the text we displayed.
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
(message "You didn't specify a function")))
|
(message "You didn't specify a function")))
|
||||||
@ -661,7 +659,6 @@ Returns the documentation as a string, also."
|
|||||||
(print-help-return-message)
|
(print-help-return-message)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(set-buffer standard-output)
|
(set-buffer standard-output)
|
||||||
(help-mode)
|
|
||||||
;; Return the text we displayed.
|
;; Return the text we displayed.
|
||||||
(buffer-string))))
|
(buffer-string))))
|
||||||
(message "You did not specify a variable")))
|
(message "You did not specify a variable")))
|
||||||
|
Loading…
Reference in New Issue
Block a user