Cleanup NONE/AUTO filetype definitions
commit5030f7f3da945c0caeb42e090991ad362d30a743
authorJiří Techet <techet@gmail.com>
Sat, 13 Feb 2016 00:43:35 +0000 (13 01:43 +0100)
committerJiří Techet <techet@gmail.com>
Fri, 26 Feb 2016 00:09:59 +0000 (26 01:09 +0100)
tree88dce08d44928a5a7eb03e7ad9e9e358eef17fce
parent77f6e98de8e50d0b9e270c113c8ba3b2828bbe19
Cleanup NONE/AUTO filetype definitions

At the moment the Geany code uses arbitrary combination of the following
synonyms

TM_PARSER_NONE / LANG_IGNORE / -2
TM_PARSER_AUTO / LANG_AUTO / -1

Especially using just the numbers makes things very confusing.

In the Geany code this patch replaces all occurrences of -2 and LANG_IGNORE
with TM_PARSER_NONE. It also removes LANG_IGNORE from the header which
isn't needed any more.

In addition, TM_PARSER_AUTO/LANG_AUTO shouldn't be used at all. We want
filetype detection based on Geany's definitions and not based on the
hard-coded ctags definitions. Remove it completely.

Finally, as it's clearer now what the constants mean, the patch fixes the
implementation of langs_compatible() (tag or file can never be of type
AUTO but we should rather check for NONE filetypes which we should
consider incompatible between each other).
src/filetypes.c
src/symbols.c
tagmanager/src/tm_parser.h
tagmanager/src/tm_source_file.c
tagmanager/src/tm_workspace.c