[Top][All Lists]

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

Re: Possible `point-entered' `point-left' Text Property Bug

From: Chong Yidong
Subject: Re: Possible `point-entered' `point-left' Text Property Bug
Date: Fri, 12 May 2006 13:51:37 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>                                         I don't know why this happens
>     even when moving vertically with point in the middle of a line, but I
>     am not familiar with the point motion code.
> I am really surprised about this because line-move-1 binds
> inhibit-point-motion-hooks to t, which ought to prevent the
> point-entered/left functions from even being checked for all the
> intermediate positions.

I investigated some more, and found two separate bugs.  The first bug
is that inhibit-point-motion-hooks was not being set to t during

The second bug is more subtle.  In simple.el line 3652, we have

        ;; Process intangibility within a line.
        ;; Move to the chosen destination position from above,
        ;; with intangibility processing enabled.

        (goto-char (point-min))
        (let ((inhibit-point-motion-hooks nil))
          (goto-char new)

Here, inhibit-point-motion-hooks is bound to nil to avoid processing
the intangible property.  But this also has the effect of spuriously
calling point-left and point-entered hooks if they are defined.  I
hacked around this by changing it to

        (goto-char new)
        (let ((inhibit-point-motion-hooks nil))
          (goto-char new)

I'm not 100% certain this will work or how to test it, so someone
familiar with the tangibility/point motion code should take a look.

reply via email to

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