The thing that will complicate it is that a Geany user can set filetype, and really uctags should use that, not its own determination.
That would be hard to do with the hacky interface we have against uctags (and I don't want to introduce too many Geany-specific things to uctags which is primarily a command-line tool).
But the main problem is that for isHeader()
uctags defaults to TRUE
for an unknown file extension which is what I'd like to change. In the C++ parser, the logic looks typically like
if (tag->isFunctionDeclaration && !isHeader())
tag->local = true;
If isHeader()
returns FALSE
for *.foo
files, we'll be fine.
Of course if the user uses something crazy like *.C
for headers, we'll be doomed but I don't think this is very likely. Also when *.foo
is a source file we get tag->local = false
incorrectly but the only difference is there will be some extra tags in the autocompletion popup which is not a big problem either and which would happen for all the tags if we applied this PR.
Also I think isHeader()
defaulting to FALSE
for unknown files is a good idea in general because real C/C++ sources tend to have the right extension but it's the headers (or header-like things like CORBA *.idl
interface definition files) which tend to have some special extension (e.g. signallist.i
in Geany or the *.hdl
files that triggered this problem).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.