summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el12
1 files changed, 8 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)