Subject: bug#28403: 25.2; find-tag works, but xref-find-definitions

From: Winston <[email-masked]>
Date: Sun, 10 Sep 2017 16:12 EDT

Eli suggested:
> ... here's how I suggest you invoke etags to solve the
> problems with the _ARGS# macros:
> 
>   etags --regex="/[ \t]*\([^ \t]+\)[ \t]+_ARGS/\1/" ...

   I don't think that quite works because it doesn't flush the number.
Probably more like:

   etags --regex="/[ \t]*\([^ \t]+\)[ \t]+_ARGS[0-9]+/\1/" ...

but since, in this particular case, there's never any leading space on
the line before a function name and the code doesn't use tabs on those
lines, maybe

   etags --regex="/\([^ ]+\) +_ARGS[0-9]+/\1/" ...

would work as well?  (Does regex have an implicit '^'?  If not, I'll use
an explicit one.)

> This will tell etags to tag the symbols immediately preceding the
> _ARGS# macro invocations _in_addition_ to what it already does.

   [Too bad etags doesn't have a way of doing "s/[ \t]+_ARGS[0-9]*//" on
the lines it normally finds...]

> Then you can use xref-find-definitions in its default configuration,
> and it will find your functions.

   OK.  I like that approach better than having to do the setq,
especially since putting a suitable etags command in a makefile is easy.
That also has the benefit of tying the fix to the code written in that
style, rather than making a global change that would affect other code I
work on.

   Thanks!
 -WBE