|
From: | Dmitry Gutov |
Subject: | Re: Allow xref to use other than current major-mode |
Date: | Tue, 25 Aug 2015 14:48:34 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 |
On 08/25/2015 01:00 PM, Stephen Leake wrote:
To handle this, I propose changing both xref-identifier-completion-table-function and xref-find-function to be mode-local, instead of buffer-local.
That seems unnecessarily limiting. First, mode-local facility is a part of CEDET, so it would need to be always loaded.
Second, how would a minor mode set an xref backend? It might not be tied to a particular major mode.
There are similar use cases; from a LaTeX document buffer, looking at the description of an Ada function, find the Ada code that defines that function. Or from a text mode notes file, look for a definition in any one of several languages.
All similar cases can be solved by a project-aware xref backend that knows about all languages used, and allows navigating to identifiers in all of them.
[Prev in Thread] | Current Thread | [Next in Thread] |