Subject: Re: bug#45922: 27.1; Better auto-fill for strings in python-mode

From: Stefan Monnier <[email-masked]>
Date: Sat, 07 May 2022 13:28:15 -0400

> But this reminds me that auto-fill-mode in programming modes is a bad
> idea in general:

Or at least, it needs to be custom-tailored (as in `smie-auto-fill` or
things along these lines).

In many/most programming languages the only real trouble is
inserting/adding newlines inside strings or newline-terminated comments.

> So I think the answer to this bug report is really -- don't use
> auto-fill in python-mode, and I'm closing it as a wontfix.

Yup, in python-mode (and other programming modes where LF is not always
treated as whitespace) it does need a lot more care.

        Stefan