From: Petr Baudis Date: Fri, 01 Aug 2008 20:20:59 GMT Subject: Re: [PATCH] Add Pascal/Delphi (.pas file) funcname pattern. Message-ID: <20080801202059.GS32184@machine.or.cz> In-Reply-To: <1217619915-9331-1-git-send-email-apenwarr@gmail.com> On Fri, Aug 01, 2008 at 03:45:15PM -0400, Avery Pennarun wrote: > diff --git a/diff.c b/diff.c > index cbf2547..c73ba69 100644 > --- a/diff.c > +++ b/diff.c > @@ -1380,6 +1380,10 @@ static struct builtin_funcname_pattern { > "^[ ]*\\(\\([ ]*" > "[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}" > "[ ]*([^;]*\\)$" }, > + { "pas", "\\(^\\(procedure\\|function\\|constructor\\|" > + "destructor\\|interface\\|implementation\\|" > + "type|initialization|finalization\\).*$\\)" > + "\\|\\(^.*=[ \t]*\\(class\\|record\\).*$\\)" }, > { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" }, > }; > Wouldn't it be better to make the second pattern start on new line instead of the outer \(\|\)? Why "type"? -- Petr "Pasky, but not writing in Pascal anymore!" Baudis As in certain cults it is possible to kill a process if you know its true name. -- Ken Thompson and Dennis M. Ritchie