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

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

bug#20498: 25.0.50; PATCH: break potential infinite loop in (line-move-t


From: Eli Zaretskii
Subject: bug#20498: 25.0.50; PATCH: break potential infinite loop in (line-move-to-column)
Date: Mon, 04 May 2015 17:27:43 +0300

> From: Dima Kogan <dima@secretsauce.net>
> Date: Sun, 03 May 2015 12:32:33 -0700
> 
> (line-move-to-column) has a loop that can become infinite:
> 
>   (while (and ...)
>     (goto-char (previous-char-property-change (point) line-beg)))
> 
> If (= (point) line-beg) then the (goto-char) does nothing, and the
> condition in the while never changes.

The full fragment is this:

        (let ((line-beg (line-beginning-position)))
          (while (and (not (bolp)) (invisible-p (1- (point))))
            (goto-char (previous-char-property-change (point) line-beg))))))))

So if (= (point) line-beg), then 'bolp' will return t, and we will
break from the loop.  Am I missing something?

> I'm seeing this in the wild with ERC and erc-fill-mode disabled.

Can you dig deeper into the problem, and tell the details about this
infloop?





reply via email to

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