On 4. Mar 2007, at 01:40, Juan wrote:
I have changed
\s+ by \s*
in the (L)anguage grammar for to C recognize also "name(args)" and not only "name (args)" as function prototype in C.
FYI the reason why I decided to make it \s+ was that I got false positives e.g. like:
string str("foo");
Which is a variable declaration, not a function declaration. Technically we probably could improve the patterns to check if the “arguments” follow a “type variable” pattern, though then we have stuff like:
int main(void);
I did easily the change in the C bundle, but my question es:
is it the best way of changing an standard bundle?
if that bundle is updated in the future by the TM developers, will it be updated in my system?
The bundle will be updated, but when changing a language grammar, you fork that grammar.
I guess the best way to have a locally modified grammar, but still have it updated with “official” changes is to checkout the bundle from the subversion repository into ~/Library/TextMate/Application Support/Bundles, then regularly svn up it, and fix the potential merge conflicts that can arise, if the default bundle is changed in a way that overlaps with the local changes.