* lisp/help-fns.el (xref-backend-references):
New context-dependent override. Don't call project-current and
use elisp-load-path-roots directly (bug#69462).
(help-fns--setup-xref-backend): No need to set
project-vc-external-roots-function then.
(cherry picked from commit
ad529831018555b4c693844bc3b18766eb78465a)
fn))
(list fn)))
+(declare-function project-combine-directories "project" (&rest lists))
+
+(cl-defmethod xref-backend-references ((_backend (eql 'elisp)) identifier
+ &context (major-mode help-mode))
+ (mapcan
+ (lambda (dir)
+ (message "Searching %s..." dir)
+ (redisplay)
+ (prog1
+ (xref-references-in-directory identifier dir)
+ (message "Searching %s... done" dir)))
+ (project-combine-directories (elisp-load-path-roots))))
+
(defun help-fns--setup-xref-backend ()
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
- (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(setq-local grep-filepattern-alist '((help-mode "*.el"))))
;;;###autoload