Function: xref--xref-buffer-mode

xref--xref-buffer-mode is an interactive and byte-compiled function defined in xref.el.gz.

Signature

(xref--xref-buffer-mode)

Documentation

Mode for displaying cross-references.

In addition to any hooks its parent mode special-mode might have run, this mode runs the hook xref--xref-buffer-mode-hook, as the final or penultimate step during initialization.

, xref-prev-line
. xref-next-line
C-o xref-show-location-at-point
M-, xref-quit-and-pop-marker-stack
N xref-next-group
P xref-prev-group
RET xref-goto-xref
TAB xref-quit-and-goto-xref
n xref-next-line
p xref-prev-line
r xref-query-replace-in-results

Probably introduced at or before Emacs version 27.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(define-derived-mode xref--xref-buffer-mode special-mode "XREF"
  "Mode for displaying cross-references."
  (setq buffer-read-only t)
  (setq next-error-function #'xref--next-error-function)
  (setq next-error-last-buffer (current-buffer))
  (setq imenu-prev-index-position-function
        #'xref--imenu-prev-index-position)
  (setq imenu-extract-index-name-function
        #'xref--imenu-extract-index-name)
  (setq-local add-log-current-defun-function
              #'xref--add-log-current-defun)
  (setq-local revert-buffer-function #'xref--revert-buffer)
  (setq-local outline-minor-mode-cycle t)
  (setq-local outline-minor-mode-use-buttons 'insert)
  (setq-local outline-search-function
              (lambda (&optional bound move backward looking-at)
                (outline-search-text-property
                 'xref-group nil bound move backward looking-at)))
  (setq-local outline-level (lambda () 1))
  (add-hook 'revert-buffer-restore-functions
            #'xref-revert-buffer-restore-point nil t))