bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47338: 28.0.50; Unexpected error in fill-region


From: Evgeny Zajcev
Subject: bug#47338: 28.0.50; Unexpected error in fill-region
Date: Thu, 25 Mar 2021 21:27:43 +0300



ср, 24 мар. 2021 г. в 12:24, Lars Ingebrigtsen <larsi@gnus.org>:
Eli Zaretskii <eliz@gnu.org> writes:

> This is the result of fixing bug#45720.  In the above scenario, the
> first time through the loop LINEBEG in the fragment below is set to
> EOB+1 instead of the point where the fill-prefix ends:
>
>       (let ((first t)
>               linebeg)
>         (while (< (point) to)
>             ;; On the first line, there may be text in the fill prefix
>             ;; zone.  In that case, don't consider that area when
>             ;; trying to find a place to put a line break (bug#45720).
>             (if (not first)
>               (setq linebeg (point))
>               (setq first nil
>                     linebeg (+ (point) (length fill-prefix)))) <<<<<<<<<<
>
> CC'ing Lars who made that change.

Right...  the change tried to fix the case where there's a pre-computed
fill prefix being passed in.  In this bug, however, the prefix is
computed, and this logic shouldn't be done here.  I've now fixed this in
Emacs 28, but I'm still not quite sure about the original fix...


Thanks! this works perfectly for me

--
lg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]