diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d2dd4167725..84a3fa4dfba 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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.