Variable: xref-auto-jump-to-first-xref

xref-auto-jump-to-first-xref is a customizable variable defined in xref.el.gz.

Value

nil

Documentation

If t, xref-find-references always jumps to the first result.

show means to show the first result's location, but keep the focus on the Xref buffer's window. move means to only move point to the first result. This variable also affects commands similar to xref-find-references, such as xref-find-references-at-mouse, xref-find-apropos, and project-find-regexp.

Please be careful when changing the value if you are using Emacs 27 or earlier: it can break dired-do-find-regexp-and-replace.

This variable was added, or its default value changed, in xref version
1.2.0.

View in manual

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(defcustom xref-auto-jump-to-first-xref nil
  "If t, `xref-find-references' always jumps to the first result.
`show' means to show the first result's location, but keep the
focus on the Xref buffer's window.
`move' means to only move point to the first result.
This variable also affects commands similar to `xref-find-references',
such as `xref-find-references-at-mouse', `xref-find-apropos',
and `project-find-regexp'.

Please be careful when changing the value if you are using Emacs 27
or earlier: it can break `dired-do-find-regexp-and-replace'."
  :type '(choice (const :tag "Jump" t)
                 (const :tag "Show" show)
                 (const :tag "Move point only" move)
                 (const :tag "No auto-jump" nil))
  :version "28.1"
  :package-version '(xref . "1.2.0"))