# HG changeset patch # User Chong Yidong # Date 1148345395 0 # Node ID 8b271981e0c58dfad3684f66ee0ee7945fa2ec03 # Parent 2a874a2efaf4bd86e1afb7788d670f784a02e0b5 Update comments. diff -r 2a874a2efaf4 -r 8b271981e0c5 lisp/simple.el --- a/lisp/simple.el Mon May 22 21:50:47 2006 +0000 +++ b/lisp/simple.el Tue May 23 00:49:55 2006 +0000 @@ -3645,10 +3645,14 @@ (setq new (point)) ;; Process intangibility within a line. - ;; Move to the chosen destination position from above, - ;; with intangibility processing enabled. - - ;; Avoid calling point-entered and point-left. + ;; With inhibit-point-motion-hooks bound to nil, a call to + ;; goto-char moves point past intangible text. + + ;; However, inhibit-point-motion-hooks controls both the + ;; intangibility and the point-entered/point-left hooks. The + ;; following hack avoids calling the point-* hooks + ;; unnecessarily. Note that we move *forward* past intangible + ;; text when the initial and final points are the same. (goto-char new) (let ((inhibit-point-motion-hooks nil)) (goto-char new) diff -r 2a874a2efaf4 -r 8b271981e0c5 src/intervals.c --- a/src/intervals.c Mon May 22 21:50:47 2006 +0000 +++ b/src/intervals.c Tue May 23 00:49:55 2006 +0000 @@ -2016,6 +2016,10 @@ register INTERVAL to, from, toprev, fromprev; int buffer_point; int old_position = BUF_PT (buffer); + /* This ensures that we move forward past intangible text when the + initial position is the same as the destination, in the rare + instances where this is important, e.g. in line-move-finish + (simple.el). */ int backwards = (charpos < old_position ? 1 : 0); int have_overlays; int original_position;