1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Autoload etags when using its xref backend

* lisp/progmodes/xref.el (xref--etags-backend):
Rename to etags--xref-backend.  Move to etags.el.  Autoload.
(Bug#22026)
This commit is contained in:
Dmitry Gutov 2015-11-27 15:21:44 +02:00
parent a5f2970207
commit a521310f9e
2 changed files with 4 additions and 3 deletions

View file

@ -2085,6 +2085,9 @@ for \\[find-tag] (which see)."
tag-implicit-name-match-p)
"Tag order used in `xref-backend-definitions' to look for definitions.")
;;;###autoload
(defun etags--xref-backend () 'etags)
(cl-defmethod xref-backend-identifier-at-point ((_backend (eql etags)))
(find-tag--default))

View file

@ -210,14 +210,12 @@ generic functions.")
;; We make the etags backend the default for now, until something
;; better comes along.
(add-hook 'xref-backend-functions #'xref--etags-backend)
(add-hook 'xref-backend-functions #'etags--xref-backend)
;;;###autoload
(defun xref-find-backend ()
(run-hook-with-args-until-success 'xref-backend-functions))
(defun xref--etags-backend () 'etags)
(cl-defgeneric xref-backend-definitions (backend identifier)
"Find definitions of IDENTIFIER.