Jonathan del Strother wrote:
Add support for recognition of Objective-C class & instance methods, C functions, and class implementation/interfaces. Signed-off-by: Jonathan del Strother <jon.delStrother@xxxxxxxxxxxxx> --- This version anchors the negated match to the beginning of the line, and shuffles the comments around to avoid the excessively long lines. Better?
Why do you insist on touching surrounding patterns? I've left them in from your patch below so you can see where you're going wrong. Those changes provide no value and make your patch harder to read. If you want to make that cleanup, submit it separately, as it has nothing to do with teaching git diff about objective C methods.
diff --git a/diff.c b/diff.c index 998dcaa..e5ec503 100644 --- a/diff.c +++ b/diff.c @@ -1398,17 +1398,31 @@ static struct builtin_funcname_pattern { } builtin_funcname_pattern[] = { { "bibtex", "\\(@[a-zA-Z]\\{1,\\}[ \t]*{\\{0,1\\}[ \t]*[^ \t\"@',\\#}{~%]*\\).*$" }, { "html", "^\\s*\\(<[Hh][1-6]\\s.*>.*\\)$" }, - { "java", "!^[ ]*\\(catch\\|do\\|for\\|if\\|instanceof\\|" + + { "java", "!^[ \t]*\\(catch\\|do\\|for\\|if\\|instanceof\\|" "new\\|return\\|switch\\|throw\\|while\\)\n" - "^[ ]*\\(\\([ ]*" + "^[ \t]*\\(\\([ \t]*" "[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}" - "[ ]*([^;]*\\)$" }, + "[ \t]*([^;]*\\)$" }, +
The above should be in a separate patch.
{ "pascal", "^\\(\\(procedure\\|function\\|constructor\\|" "destructor\\|interface\\|implementation\\|" "initialization\\|finalization\\)[ \t]*.*\\)$" "\\|" - "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$" - }, + "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$"}, +
This last change is just pure nonsense. Please remove it altogether. -- Andreas Ericsson andreas.ericsson@xxxxxx OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html