Function: hsys-xref-definitions
hsys-xref-definitions is a byte-compiled function defined in
hsys-xref.el.
Signature
(hsys-xref-definitions IDENTIFIER)
Documentation
Return a list of all definitions of string IDENTIFIER.
If in an Emacs Lisp mode and there is more than one definition, filter out
feature' items which can shadow more important items when named the same,
e.g. eww.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hsys-xref.el
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
(defun hsys-xref-definitions (identifier)
"Return a list of all definitions of string IDENTIFIER.
If in an Emacs Lisp mode and there is more than one definition, filter out
feature' items which can shadow more important items when named the same,
e.g. `eww'."
(let* ((elisp-flag (smart-emacs-lisp-mode-p t))
(xref-backend (or (and elisp-flag
(fboundp 'ert-test-boundp)
(ert-test-boundp (intern-soft identifier))
(boundp 'xref-etags-mode)
'etags)
(xref-find-backend)))
(xref-items (xref-backend-definitions xref-backend identifier)))
(when (and elisp-flag (> (length xref-items) 1))
(setq xref-items (or (delq nil (mapcar (lambda (item)
;; Filter out `feature' entries
;; since these can shadow defuns if
;; the same name, e.g. `eww'.
(when (not (string-match "(feature "
(xref-item-summary item)))
item))
xref-items))
xref-items)))
xref-items))