[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20774: auto-fill doesn't work properly when first-line prefix differ
From: |
npostavs |
Subject: |
bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode |
Date: |
Thu, 24 Aug 2017 21:45:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
Samuel Freilich <sfreilich@google.com> 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.)