xref-find-backend: Error instead of returning nil

* lisp/progmodes/xref.el (xref-find-backend):
Signal error when we can't find a backend to use (bug#80246).
This commit is contained in:
Dmitry Gutov 2026-01-29 17:11:17 +02:00
parent 38d0ac8f67
commit 3937833fff

View file

@ -247,7 +247,9 @@ generic functions.")
;;;###autoload
(defun xref-find-backend ()
(run-hook-with-args-until-success 'xref-backend-functions))
(or
(run-hook-with-args-until-success 'xref-backend-functions)
(user-error "No Xref backend available")))
(cl-defgeneric xref-backend-definitions (backend identifier)
"Find definitions of IDENTIFIER.