bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28403: 25.2; find-tag works, but xref-find-definitions doesn't; bug?


From: Winston
Subject: bug#28403: 25.2; find-tag works, but xref-find-definitions doesn't; bug?
Date: Sat, 9 Sep 2017 18:40 EDT

[Emacs 25.2; it looks (to me) like a regexp match pattern issue in
 xref.el, not an O/S issue.]

   Today I noticed the message about find-tag being (supposedly)
obsoleted by xref-find-definitions as of Emacs version 25.1, so I tried
the new command.  Unfortunately, the new one failed completely on an
entire class of function definitions.

   After some experimenting, it appears that the problem may be that
xref-find-definitions only works when the function definition is of the
form: name spacing* '('.

   The C code in question uses macros around function arguments in its
definitions.  E.g.,

        name _ARGS1(type,variable)

   find-tag (and etags) work just fine with that, and such function
definition lines appear in the TAGS file (as they should), but
xref-find-definitions fails to find such function tags, saying instead
"No definitions found for: name".

   Changing the function definition line to

        name (type variable)

as a test, re-running etags, and reloading TAGS, xref-find-definitions
found the tag and went to it.

   So, xref-find-definitions is not yet a complete replacement for
find-tag.  Since etags puts such lines in TAGS and xref-find-definitions
is unable to match up the name with the tag, it looks like a bug /
deficiency in xref-find-definitions.
 -WBE





reply via email to

[Prev in Thread] Current Thread [Next in Thread]