]> git.eshelyaron.com Git - emacs.git/commit
Use generic dispatch for xref backends
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 14 Nov 2015 00:37:01 +0000 (02:37 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 14 Nov 2015 00:41:38 +0000 (02:41 +0200)
commit246d6605f72810b1d4977947f266cf48b933446f
tree03514ec1ab6ab407d7beb70b0dc7d221aa0157a9
parent31f6e939334180add7bc11240343615a2e6350f6
Use generic dispatch for xref backends

* lisp/progmodes/xref.el (xref-backend-functions):
New variable.
(xref-find-function): Remove.
(xref-find-backend)
(xref--etags-backend): New functions.
(xref-identifier-at-point-function)
(xref-identifier-completion-table-function): Remove.
(xref-backend-definitions, xref-backend-references)
(xref-backend-apropos, xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table):
New generic functions.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
`elisp--xref-backend' to the beginning of
`xref-backend-functions', locally.  Delete references to
removed functions and vars.
(elisp-xref-find): Remove.
(elisp--xref-backend): New function.
(elisp--xref-find-references, elisp--xref-find-apropos)
(elisp--xref-identifier-completion-table):
Turn into appropriately named generic methods.

* lisp/progmodes/etags.el (etags-xref-find): Remove.
(xref-backend-identifier-completion-table)
(xref-backend-references, xref-backend-definitions)
(xref-backend-apropos): New generic methods.
lisp/progmodes/elisp-mode.el
lisp/progmodes/etags.el
lisp/progmodes/xref.el