GNU bug report logs -
#28403
25.2; find-tag works, but xref-find-definitions doesn't; bug?
Previous Next
Reported by: Winston <wbe <at> psr.com>
Date: Sat, 9 Sep 2017 22:41:02 UTC
Severity: normal
Found in version 25.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 28403 <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 7 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.