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

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

bug#15312: Info (point-entered, point-left): Doc incomplete, hence incor


From: Eli Zaretskii
Subject: bug#15312: Info (point-entered, point-left): Doc incomplete, hence incorrect
Date: Mon, 16 Sep 2013 20:10:41 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Mon, 16 Sep 2013 12:15:27 -0400
> 
> > Perhaps we need to step back and talk about the situations where these
> > hooks are supposed to be used.  Because I cannot see any sense in
> > calling the hooks when the values of these properties don't change.
> 
> Agreed, but the code also runs the hook when the value of the
> `point-entered' does not change but the value of some unrelated
> property changes.  That is an error.

Of course.  But I was trying to say that we should formulate a clear
specification for when these hooks shall be called.  What the manual
says now makes little sense to me (and is also somewhat vague).

> >> The right thing to do is to declare point-entered and point-left
> >> properties as obsolete and replace them by something like cursor-entered
> >> and cursor-left properties which are only checked at command boundaries
> >> (or better, checked just before redisplay).
> > Redisplay can be forced as part of a command.
> 
> I know, and I think that for most uses of these kinds of properties we'd
> also want to run the hook when redisplay is called in the middle of
> a command (e.g. in the middle of query-replace).  Note that we'd probably
> also want to run the hook when redisplay is short-circuited by pending input.

Calling this from redisplay might need some non-trivial protocol,
because the hook can legitimately move point, which will re-enter
redisplay, which will call the hook...





reply via email to

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