Subject: Re: bug#19466: 25.0.50; xref-find-def doesn't find C functions

From: Eli Zaretskii <[email-masked]>
Date: Tue, 30 Dec 2014 20:34:03 +0200

> Date: Tue, 30 Dec 2014 20:25:25 +0200
> From: Dmitry Gutov <[email-masked]>
> CC: [email-masked]
> 
> On 12/30/2014 08:05 PM, Stefan Monnier wrote:
> >> Isn't it possible to _prefer_ the symbols that are consistent with the
> >> major mode, but not entirely discard the other possible candidates?
> >
> > Indeed there should be a way to use the tags.el backend (or other
> > similar whole-project systems like GNU global, ...) instead of the
> > major mode's backend.
> 
> In general, a minor mode would do that (set project-specific 
> xref-find-function and friends, etc), probably using a system like 
> projectile to determine the current project kind.
> 
> We could do something specific for Emacs sources, but if using lisp/TAGS 
> is preferred over find-func by the same developers who work on C 
> sources, maybe emacs-lisp-mode shouldn't make any changes in xref-* 
> variables for them. An boolean option would be the simplest solution.

I probably don't understand exactly what you are suggesting, but can
we look at this from another angle: how can xref support looking up
symbols for projects that use more than one major mode?  E.g., could
the back-end be a list of functions, rather than just one?