[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Teemu Likonen
Subject: bug#1756: awk-mode: An empty line is not a paragraph separator (should be)
Date: Wed, 07 Jan 2009 18:32:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

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. :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]