Function: xref-backend-references

xref-backend-references is a byte-compiled function defined in xref.el.gz.

Signature

(xref-backend-references BACKEND IDENTIFIER)

Documentation

Find references of IDENTIFIER.

The result must be a list of xref objects. If no references can be found, return nil.

The default implementation uses semantic-symref-tool-alist to find a search tool; by default, this uses "find | grep" in the current project's main and external roots.

Implementations

((backend (eql cider)) var) in `cider-xref-backend.el'.

Find references of VAR.

(backend identifier) in `xref.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(cl-defgeneric xref-backend-references (_backend identifier)
  "Find references of IDENTIFIER.
The result must be a list of xref objects.  If no references can
be found, return nil.

The default implementation uses `semantic-symref-tool-alist' to
find a search tool; by default, this uses \"find | grep\" in the
current project's main and external roots."
  (mapcan
   (lambda (dir)
     (message "Searching %s..." dir)
     (redisplay)
     (prog1
         (xref-references-in-directory identifier dir)
       (message "Searching %s... done" dir)))
   (let ((pr (project-current t)))
     (cons
      (xref--project-root pr)
      (project-external-roots pr)))))