unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Possible `point-entered' `point-left' Text Property Bug
Date: Fri, 12 May 2006 00:15:45 -0400	[thread overview]
Message-ID: <E1FeP45-0002PM-8j@fencepost.gnu.org> (raw)
In-Reply-To: <87r7304jck.fsf@stupidchicken.com> (message from Chong Yidong on Thu, 11 May 2006 12:27:55 -0400)

    When executing previous-line and next-line, a situation can arise
    where no "character before point" is found for the point left, whereas
    one exists for the point entered (or vice versa).  That's why the
    point-entered/left hooks are called.

That seems like correct behavior to me.  At least, more correct than
the alternative.  If the entered/left functions are called in this
case, they can detect this case and decide to do nothing.  But if we
change the code NOT to call them in this case, and some program wants
them to be called, there is nothing it can do.

Does this behavior really cause a problem that is hard to work around?
Or did it just strike people as incorrect?

					  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.

The easy way to determine why they get called is to put breakpoints
on the call2 lines:

      if (! EQ (leave_before, enter_before) && !NILP (leave_before))
	call2 (leave_before, make_number (old_position),
	       make_number (charpos));
      if (! EQ (leave_after, enter_after) && !NILP (leave_after))
	call2 (leave_after, make_number (old_position),
	       make_number (charpos));

      if (! EQ (enter_before, leave_before) && !NILP (enter_before))
	call2 (enter_before, make_number (old_position),
	       make_number (charpos));
      if (! EQ (enter_after, leave_after) && !NILP (enter_after))
	call2 (enter_after, make_number (old_position),
	       make_number (charpos));

  reply	other threads:[~2006-05-12  4:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11 16:27 Possible `point-entered' `point-left' Text Property Bug Chong Yidong
2006-05-12  4:15 ` Richard Stallman [this message]
2006-05-12 14:05   ` Chong Yidong
2006-05-13  4:53     ` Richard Stallman
2006-05-12 17:51   ` Chong Yidong
2006-05-12 18:34     ` Chong Yidong
2006-05-13  4:53       ` Richard Stallman
2006-05-13  4:53     ` Richard Stallman
2006-05-13 15:28       ` Chong Yidong
2006-05-14 15:09         ` Richard Stallman
2006-05-14 15:24           ` Chong Yidong
2006-05-15  5:13             ` Richard Stallman
2006-05-15 16:14               ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1FeP45-0002PM-8j@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).