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

Previous Next

Packages: cc-mode, emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Thu, 1 Jan 2009 08:35:04 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #62 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: bug-cc-mode <at> gnu.org
Cc: 1756 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1756: awk-mode: An empty line is not a paragraph separator (should be)
Date: Wed, 07 Jan 2009 18:32:56 +0200
Alan Mackenzie (2009-01-06 16:15 +0000) wrote:

>> After "C-c . awk RET" it changes to this:
>
>>     "[ \t]*\\(\\(#+\\)[ \t]*\\)?$\\|^\f"
>                    ^^
>
>> Even though I chose to override the style settings "#*" changes to "#+".
>
> I don't think this is a bug.  You asked for "awk" style to be set on the
> buffer, and this is exactly what you got.

Well, I asked that, but I had also explicitly asked to override style
settings (through the customize interface). My opinion is that the
current behavior is so confusing that it's either a bug or simply wrong
design decision.

I don't mean to complain too loudly, though. See below.

> I am guessing that the cause is in the fine CC Mode manual, [...]

> [...] perhaps it would be better if amended something like this:
>
>     When you initialize the buffer, the settings are made in the
>     following order.  So if you make conflicting settings in several of
>     these ways, the way that takes precedence is the one that appears
>     latest in the list(2):
>
>         Style
>         Top-level command or "customization interface"
>         Hook
>         File Style

>     ---------- Footnotes ----------
>     (2) If you later call `c-set-style' (C-c .), all the style variables
>     will get set to the style you select.
>  
> What do you think?

Well, my real opinion first: User's explicit "override style settings"
setting should just do that: override style settings no matter what
style changes the user does while editing the buffer. For example, user
may want to choose certain custom comment prefix settings and, while
editing the code, she may want to experiment with different style
settings or convert the code from one style to another. Logically, if
she wants to get comment prefix settings from a pre-defined style she
chooses "Use style settings" (c-comment-prefix-regexp). If she wants to
use her own comment prefix she chooses "Override style settings". I
think this is the most intuitive behaviour. Currently user can only
override style settings for the initial style state.

But if you choose to maintain the current behaviour anyway, then I'd say
that the changes you suggested for the documentation are very good. I'd
also suggest to change the documentation of c-comment-prefix-regexp
variable so that it tells how the variable effects in the practice.

Anyway, the empty-line bug is the main thing. If that bug in Awk mode
gets fixed (you already did with that patch) then there shouldn't be
much need for changing comment prefixes in the first place. So I'm
really more on the "thank you" side than on "complaining" side. :-)





This bug report was last modified 15 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.