Subject: Re: bug#36702: 27.0.50; newline: don't auto-fill regardless of auto-fill-mode

From: "Basil L. Contovounesios" <[email-masked]>
Date: Thu, 18 Jul 2019 14:32:41 +0100

Andreas Röhler <[email-masked]> writes:

> On 17.07.19 21:07, Basil L. Contovounesios wrote:
>> Andreas Röhler <[email-masked]> writes:
>>
>>> Decoupling it should not break anything. When fixed, just setting an
>>> auto-fill-function will no longer trigger auto-fill in case auto-fill-mode is
>>> off.
>> But auto-fill-function is effectively synonymous with auto-fill-mode.
>
> Consider that a design flaw. Just setting a var should not trigger a mode.

Depends on how you set the variable:

- Most minor modes can be enabled by customising their mode variable.
- The mode variable of auto-fill-mode is auto-fill-function.
- Calling auto-fill-mode directly does little more than set
  auto-fill-function.
- In this sense it's similar to a glorified indent-tabs-mode.
- Setting the mode variable of auto-fill-mode and being surprised when
  auto-fill ensues in certain cases is a pilot error.

For better or worse, this is all long-standing and documented behaviour,
so unless you have concrete proposals for how to improve on said design
flaw in a backward-compatible way, I'm not sure there's much to be done
except for clarify the documentation where possible.

Thanks,

-- 
Basil