Subject: Re: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode

From: [email-masked]
Date: Thu, 24 Aug 2017 21:45:17 -0400

Samuel Freilich <[email-masked]> writes:

> You're right about string-width, since I'm counting number of columns.
> Fixed that. (Which required me to deal with the fact that fill-prefix can
> be nil.)

Actually, it's now occuring to me that adding a position to a
string-width isn't quite correct either, since it doesn't take into
account wide characters on the current line.  I guess it should actually
be something like

    (save-excursion
      (if line-prefix
          (move-to-column (string-width line-prefix))
        (beginning-of-line))
      (point))

> I've attached the fixed version of the patch with a hopefully-improved
> commit message.

That is much better, thanks.  (One more minor formatting nitpick, there
should be 2 spaces after the period.)