diff options
-rw-r--r-- | lisp/simple.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 7556b5adcfd..49ce95dfcfc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7837,7 +7837,8 @@ If NOERROR, don't signal an error if we can't move that many lines." (defun line-move-1 (arg &optional noerror _to-end) ;; Don't run any point-motion hooks, and disregard intangibility, ;; for intermediate positions. - (let ((inhibit-point-motion-hooks t) + (let ((outer-ipmh inhibit-point-motion-hooks) + (inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) (if (consp temporary-goal-column) @@ -7949,20 +7950,20 @@ If NOERROR, don't signal an error if we can't move that many lines." ;; point-left-hooks. (let* ((npoint (prog1 (line-end-position) (goto-char opoint))) - (inhibit-point-motion-hooks nil)) + (inhibit-point-motion-hooks outer-ipmh)) (goto-char npoint))) ((< arg 0) ;; If we did not move up as far as desired, ;; at least go to beginning of line. (let* ((npoint (prog1 (line-beginning-position) (goto-char opoint))) - (inhibit-point-motion-hooks nil)) + (inhibit-point-motion-hooks outer-ipmh)) (goto-char npoint))) (t (line-move-finish (or goal-column temporary-goal-column) - opoint (> orig-arg 0))))))) + opoint (> orig-arg 0) (not outer-ipmh))))))) -(defun line-move-finish (column opoint forward) +(defun line-move-finish (column opoint forward &optional not-ipmh) (let ((repeat t)) (while repeat ;; Set REPEAT to t to repeat the whole thing. @@ -8013,7 +8014,7 @@ If NOERROR, don't signal an error if we can't move that many lines." ;; 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)) + (let ((inhibit-point-motion-hooks (not not-ipmh))) (goto-char new) ;; If intangibility moves us to a different (later) place @@ -8038,7 +8039,7 @@ If NOERROR, don't signal an error if we can't move that many lines." ;; Now move to the updated destination, processing fields ;; as well as intangibility. (goto-char opoint) - (let ((inhibit-point-motion-hooks nil)) + (let ((inhibit-point-motion-hooks (not not-ipmh))) (goto-char ;; Ignore field boundaries if the initial and final ;; positions have the same `field' property, even if the |