I use xref to find tags in emacs 25.
My problem is with C defines, when there are multiple definitions. The *xref* buffer shows suggestions, but does not show enough text (it stops right after the identifier).
For example, when looking up PRINTF
, one of the found definitions showed in the *xref* buffer
looks like this:
#define PRINTF(
while the actual code at that location is:
#define PRINTF(FORMAT, args ...) printf_P(PSTR(FORMAT), ## args)
How do I make the xref buffer show the whole row in the file?
Edit: creating my TAGS with:
;; Shell command: find . -type f \( -name '*.cpp' -o -name '*.[ch]pp' \) | etags -
(defun create-tags (dir-name)
"Create tags file."
(interactive "DDirectory: ")
(shell-command
(format "cd %s && find . -type f \\( -name \'*.[ch]\' -o -name \'*.[ch]pp\' \\) | etags -" dir-name))
)
etags
, editing to add how. – Gauthier May 30 '18 at 21:20etags
's behavior, and you can't find a relevant flag to change it, please go ahead and file a bug report. – Dmitry May 31 '18 at 12:34