summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 624b855f2c7..48433d899ab 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -177,6 +177,11 @@ The format is (FUNCTION ARGS...).")
'help-function 'describe-variable
'help-echo (purecopy "mouse-2, RET: describe this variable"))
+(define-button-type 'help-type
+ :supertype 'help-xref
+ 'help-function #'cl-describe-type
+ 'help-echo (purecopy "mouse-2, RET: describe this type"))
+
(define-button-type 'help-face
:supertype 'help-xref
'help-function 'describe-face
@@ -498,6 +503,20 @@ This should be called very early, before the output buffer is cleared,
because we want to record the \"previous\" position of point so we can
restore it properly when going back."
(with-current-buffer (help-buffer)
+ ;; Disable `outline-minor-mode' in a reused Help buffer
+ ;; created by `describe-bindings' that enables this mode.
+ (when (bound-and-true-p outline-minor-mode)
+ (outline-minor-mode -1)
+ (mapc #'kill-local-variable
+ '(outline-search-function
+ outline-regexp
+ outline-heading-end-regexp
+ outline-level
+ outline-minor-mode-cycle
+ outline-minor-mode-highlight
+ outline-minor-mode-use-buttons
+ outline-default-state
+ outline-default-rules)))
(when help-xref-stack-item
(push (cons (point) help-xref-stack-item) help-xref-stack)
(setq help-xref-forward-stack nil))
@@ -531,6 +550,9 @@ it does not already exist."
(or (and (boundp symbol) (not (keywordp symbol)))
(get symbol 'variable-documentation)))
,#'describe-variable)
+ ;; FIXME: We could go crazy and add another entry so describe-symbol can be
+ ;; used with the slot names of CL structs (and/or EIEIO objects).
+ ("type" ,#'cl-find-class ,#'cl-describe-type)
("face" ,#'facep ,(lambda (s _b _f) (describe-face s))))
"List of providers of information about symbols.
Each element has the form (NAME TESTFUN DESCFUN) where: