git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: chapter and part in funcname for tex

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2008, 17:59 UTC
Message-ID
<7vprormh7a.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1217678145-2630-1-git-send-email-giuseppe.bilotta@gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
Show 23 quoted lines
> 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>
>
> ---
>
> Resend, with Signed-off-by: line
>
>  diff.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/diff.c b/diff.c
> index c253015..776bce1 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {
>  			"^[ 	]*\\(\\([ 	]*"
>  			"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
>  			"[ 	]*([^;]*\\)$" },
> -	{ "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
> +	{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\?{.*\\)$" },
Ok on idea, but NAK on implementation.

"A\?" to mean 0 or one "A" in BRE is GNU extention and we try to avoid it. "A\{0,1\}" is equivalent and we already use the bound notation in "java" section, so perhaps this is an Ok replacement?

	{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },
Previous: Giuseppe BilottaNext: Giuseppe Bilotta
Message 3 of 4 in “diff: chapter and part in funcname for tex”
  1. diff: chapter and part in funcname for texGiuseppe Bilotta, Aug 2, 2008
  2. diff: chapter and part in funcname for texGiuseppe Bilotta, Aug 2, 2008
  3. Junio C HamanoAug 2, 2008
  4. diff: chapter and part in funcname for texGiuseppe Bilotta, Aug 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.