Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice

From: Stefan Monnier <[email-masked]>
Date: Tue, 31 May 2022 08:26:16 -0400

Lars Ingebrigtsen [2022-05-30 20:24:33] wrote:
> Stefan Monnier <[email-masked]> writes:
>> The commit message doesn't explain why it changes `comment-style`.
>> Was that an oversight?
>
> Yes, sort of.  The change is wrong, and should be fixed a different way,
> I think.
>
> The problem is that if you have this:
>
> ---
> foo
>
> bar
> ---
>
> and comments out the blank line in the middle with `M-x comment-region',
> you get
>
> ---
> foo
>           %%
> bar
> ---
>
> Which doesn't seem right, so I assumed that `indent' didn't work for
> latex-mode.

Before your patch, this didn't comment out anything since it skipped
empty lines, thus the problem didn't exist.

> But that's probably a bug in the `indent' version instead,
> because `indent' should work in general.

Yes, it's a new problem introduced by the new functionality of
commenting out empty lines (and it probably affects more than just the
`indent` style, since most styles (other than `plain`) try to indent the
comment, IIRC).

        Stefan