From b50005b79f6c77f9846c3f34ba319675fe489b72 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 1 Aug 2008 17:00:15 -0400 Subject: [PATCH] Teach "git diff -p" Pascal/Delphi funcname pattern Finds classes, records, functions, procedures, and sections. Most lines need to start at the first column, or else there's no way to differentiate a procedure's definition from its declaration. Signed-off-by: Avery Pennarun Signed-off-by: Junio C Hamano --- diff.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/diff.c b/diff.c index c253015c5..75a8b1664 100644 --- a/diff.c +++ b/diff.c @@ -1380,6 +1380,12 @@ static struct builtin_funcname_pattern { "^[ ]*\\(\\([ ]*" "[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}" "[ ]*([^;]*\\)$" }, + { "pascal", "^\\(\\(procedure\\|function\\|constructor\\|" + "destructor\\|interface\\|implementation\\|" + "initialization\\|finalization\\)[ \t]*.*\\)$" + "\\|" + "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$" + }, { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" }, { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" }, }; -- 2.30.2