summaryrefslogtreecommitdiff
path: root/lisp/apropos.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-11-21 09:56:06 +0200
committerJuri Linkov <juri@linkov.net>2022-11-21 09:56:06 +0200
commitd9d8a2eba92c4e6ef4145f222c43c86f75875ce2 (patch)
tree2fda8ae6a5979dec88a1c6995295951efafc2eb3 /lisp/apropos.el
parent6b0179f7908c658342d1e642e5444e3d2e1cd997 (diff)
downloademacs-d9d8a2eba92c4e6ef4145f222c43c86f75875ce2.tar.gz
* lisp/outline.el (outline-search-function): New variable (bug#53981).
(outline-font-lock-keywords, outline-font-lock-face) (outline-minor-mode-highlight-buffer, outline-next-preface) (outline-next-heading, outline-previous-heading) (outline-back-to-heading, outline-on-heading-p, outline-demote) (outline-map-region, outline-next-visible-heading) (outline-hide-sublevels, outline-up-heading): Use outline-search-function when it's non-nil as an alternative to searching outline-regexp. (outline-search-level, outline-search-text-property): New functions. * lisp/apropos.el (apropos-mode): Set outline-search-function instead of unreliable outline-regexp. (apropos-print): Add text property outline-level. * lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Add text property outline-level on text separate from final newlines. (shortdoc-display-group): Add a narrow newline to not show text properties of the final line when the outline is hidden. (shortdoc--display-function): Add text property outline-level. (shortdoc-mode): Set buffer-local outline-search-function and outline-level.
Diffstat (limited to 'lisp/apropos.el')
-rw-r--r--lisp/apropos.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el
index d9d8f4c372b..a731926f458 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -492,7 +492,7 @@ Intended as a value for `revert-buffer-function'."
\\{apropos-mode-map}"
(make-local-variable 'apropos--current)
(setq-local revert-buffer-function #'apropos--revert-buffer)
- (setq-local outline-regexp "^[^ \n]+"
+ (setq-local outline-search-function #'outline-search-level
outline-level (lambda () 1)
outline-minor-mode-cycle t
outline-minor-mode-highlight t
@@ -1188,7 +1188,8 @@ as a heading."
(insert-text-button (symbol-name symbol)
'type 'apropos-symbol
'skip apropos-multi-type
- 'face 'apropos-symbol)
+ 'face 'apropos-symbol
+ 'outline-level 1)
(setq button-end (point))
(if (and (eq apropos-sort-by-scores 'verbose)
(cadr apropos-item))