Subject: bug#21934: 24.5; find-tag: reading TAGS file incorrectly

From: Dmitry Gutov <[email-masked]>
Date: Sun, 22 Nov 2015 17:23:41 +0200

On 11/22/2015 05:06 PM, Andreas Matthias wrote:

>> So I think what you're saying is lua-mode should add "." to the syntax-class
>> "symbol". However:
>
> I'm sorry, I'm not familiar with emacs internals like the syntax table.

The above would mean that (thing-at-point 'symbol) will return 
`Rectangle.getPos', and not just `getPos'.

So when you press M-., that's what xref-find-definitions (or find-tag) 
will be searching for.

> Tables are the main data structure of Lua. Although the dot operator
> can be used in the sense of OOP, more often than not the dot operator
> is just used to access elements of a table.

If you use anonymous tables as well, and copy/inherit/modify them, like

   a = {
     withdraw = function(self, v)
       self.balance = self.balance - v
     end
   }

   b = a.copy()

   b:withdraw(10)

then having "widthdraw" as the tag name seems useful.

> Maybe. But how do you handle getPos() from the example which exists
> twice, once in table Rectangle and once in table Circle?

You add both entries to TAGS, one after another. Yes, it will double the 
size of the TAGS file, more or less.

I think we already do that by default for C++.