Subject: bug#1756: awk-mode: An empty line is not a paragraph separator (should be)

From: Teemu Likonen <[email-masked]>
Date: Mon, 05 Jan 2009 20:38:05 +0200

Alan Mackenzie (2009-01-05 18:35 +0000) wrote:

> Can you give me precise recipe to reproduce this, please.  It worked OK
> for me when I tried it.  When I did the following:
>
> (i) M-: (setcdr (cadr c-comment-prefix-regexp) "#*") ; Changes the entry
>           ; from (awk . "#+") to (awk . "#*")
> (ii) C-c . <CR> awk  ; from within an AWK buffer
>
> , M-: paragraph-start gave me "[ \t]*\\(#*\\)[ \t]*$\\|^\f"
>                                         ^^
> which has incorporated the new value from c-comment-prefix-regexp.

I can reproduce it by setting c-comment-prefix-regexp through the
customize system:

    M-x customize-option RET c-comment-prefix-regexp RET

Select "Override style settings" and "Mode-specific regexps". Type #* to
the AWK string and save the settings. Now, when I do "M-x awk-mode" I
get this paragraph-start:

    "[ \t]*\\(#*\\)[ \t]*$\\|^\f"

After "C-c . awk RET" it changes to this:

    "[ \t]*\\(\\(#+\\)[ \t]*\\)?$\\|^\f"

Even though I chose to override the style settings "#*" changes to "#+".

I have your previous patch applied so there is this additional
subexpression level "\(...\)?" too.