* lisp/progmodes/xref.el: Support outline-minor-mode (bug#49731)
(xref--xref-buffer-mode): Set buffer-local variables outline-minor-mode-cycle, outline-minor-mode-use-buttons, outline-search-function, outline-level as settings for enabling outline-minor-mode in xref output buffers where outline headings are xref groups, and their lines can be hidden by outline commands.
This commit is contained in:
parent
5e8c62ffca
commit
3573ebfa6d
1 changed files with 10 additions and 1 deletions
|
@ -919,6 +919,8 @@ ITEMS is an xref item which " ; FIXME: Expand documentation.
|
|||
(define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack)
|
||||
map))
|
||||
|
||||
(declare-function outline-search-text-property "outline" (property &optional value bound move backward looking-at))
|
||||
|
||||
(define-derived-mode xref--xref-buffer-mode special-mode "XREF"
|
||||
"Mode for displaying cross-references."
|
||||
(setq buffer-read-only t)
|
||||
|
@ -927,7 +929,14 @@ ITEMS is an xref item which " ; FIXME: Expand documentation.
|
|||
(setq imenu-prev-index-position-function
|
||||
#'xref--imenu-prev-index-position)
|
||||
(setq imenu-extract-index-name-function
|
||||
#'xref--imenu-extract-index-name))
|
||||
#'xref--imenu-extract-index-name)
|
||||
(setq-local outline-minor-mode-cycle t
|
||||
outline-minor-mode-use-buttons t
|
||||
outline-search-function
|
||||
(lambda (&optional bound move backward looking-at)
|
||||
(outline-search-text-property
|
||||
'xref-group nil bound move backward looking-at))
|
||||
outline-level (lambda () 1)))
|
||||
|
||||
(defvar xref--transient-buffer-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
|
|
Loading…
Add table
Reference in a new issue