summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-05-23 00:49:55 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-05-23 00:49:55 +0000
commit594a1605cd54c3d65dd373b6b4118765398b2aed (patch)
treeabc77350a14f88e7e5edd7af41a6d3cbad933c04
parent8e6ea7a32117a8948dfd0f3acd0bd2beaa806728 (diff)
downloademacs-594a1605cd54c3d65dd373b6b4118765398b2aed.tar.gz
Update comments.
-rw-r--r--lisp/simple.el12
-rw-r--r--src/intervals.c4
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index cee04f4a961..2209603d91c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3645,10 +3645,14 @@ Outline mode sets this."
(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 --git a/src/intervals.c b/src/intervals.c
index e69ff701387..20c4c191a93 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -2016,6 +2016,10 @@ set_point_both (buffer, charpos, bytepos)
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;