Code

diff: chapter and part in funcname for tex
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 2 Aug 2008 21:56:44 +0000 (23:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Aug 2008 22:40:57 +0000 (15:40 -0700)
This patch enhances the tex funcname by adding support for
chapter and part sectioning commands. It also matches
the starred version of the sectioning commands.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c

diff --git a/diff.c b/diff.c
index 75a8b166429aa6c9967b04152577f3ad0d67b20f..bd04fdfd283ce2e242b6f5c479452b36df8f5f86 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1386,7 +1386,7 @@ static struct builtin_funcname_pattern {
                        "\\|"
                        "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$"
                        },
-       { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
+       { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },
        { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
 };