summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/simple.el69
-rw-r--r--lisp/subr.el7
-rw-r--r--src/textprop.c10
3 files changed, 43 insertions, 43 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 49ce95dfcfc..d2dcbe27a07 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7837,6 +7837,7 @@ 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.
+ (with-suppressed-warnings ((obsolete inhibit-point-motion-hooks))
(let ((outer-ipmh inhibit-point-motion-hooks)
(inhibit-point-motion-hooks t)
(opoint (point))
@@ -7961,7 +7962,7 @@ If NOERROR, don't signal an error if we can't move that many lines."
(goto-char npoint)))
(t
(line-move-finish (or goal-column temporary-goal-column)
- opoint (> orig-arg 0) (not outer-ipmh)))))))
+ opoint (> orig-arg 0) (not outer-ipmh))))))))
(defun line-move-finish (column opoint forward &optional not-ipmh)
(let ((repeat t))
@@ -8014,42 +8015,44 @@ 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 (not not-ipmh)))
- (goto-char new)
-
- ;; If intangibility moves us to a different (later) place
- ;; in the same line, use that as the destination.
- (if (<= (point) line-end)
- (setq new (point))
- ;; If that position is "too late",
- ;; try the previous allowable position.
- ;; See if it is ok.
- (backward-char)
- (if (if forward
- ;; If going forward, don't accept the previous
- ;; allowable position if it is before the target line.
- (< line-beg (point))
- ;; If going backward, don't accept the previous
- ;; allowable position if it is still after the target line.
- (<= (point) line-end))
- (setq new (point))
- ;; As a last resort, use the end of the line.
- (setq new line-end))))
+ (with-suppressed-warnings ((obsolete inhibit-point-motion-hooks))
+ (let ((inhibit-point-motion-hooks (not not-ipmh)))
+ (goto-char new)
+
+ ;; If intangibility moves us to a different (later) place
+ ;; in the same line, use that as the destination.
+ (if (<= (point) line-end)
+ (setq new (point))
+ ;; If that position is "too late",
+ ;; try the previous allowable position.
+ ;; See if it is ok.
+ (backward-char)
+ (if (if forward
+ ;; If going forward, don't accept the previous
+ ;; allowable position if it is before the target line.
+ (< line-beg (point))
+ ;; If going backward, don't accept the previous
+ ;; allowable position if it is still after the target line.
+ (<= (point) line-end))
+ (setq new (point))
+ ;; As a last resort, use the end of the line.
+ (setq new line-end)))))
;; Now move to the updated destination, processing fields
;; as well as intangibility.
(goto-char opoint)
- (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
- ;; fields are non-contiguous. This seems to be "nicer"
- ;; behavior in many situations.
- (if (eq (get-char-property new 'field)
- (get-char-property opoint 'field))
- new
- (constrain-to-field new opoint t t
- 'inhibit-line-move-field-capture))))
+ (with-suppressed-warnings ((obsolete inhibit-point-motion-hooks))
+ (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
+ ;; fields are non-contiguous. This seems to be "nicer"
+ ;; behavior in many situations.
+ (if (eq (get-char-property new 'field)
+ (get-char-property opoint 'field))
+ new
+ (constrain-to-field new opoint t t
+ 'inhibit-line-move-field-capture)))))
;; If all this moved us to a different line,
;; retry everything within that new line.
diff --git a/lisp/subr.el b/lisp/subr.el
index c975c216bb6..56ce9fa69b9 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1837,7 +1837,12 @@ be a list of the form returned by `event-start' and `event-end'."
(set-advertised-calling-convention 'time-convert '(time form) "29.1")
;;;; Obsolescence declarations for variables, and aliases.
-
+(make-obsolete-variable
+ 'inhibit-point-motion-hooks
+ "use `cursor-intangible-mode' or `cursor-sensor-mode' instead"
+ ;; It's been announced as obsolete in NEWS and in the docstring since Emacs-25,
+ ;; but it's only been marked for compilation warnings since Emacs-29.
+ "25.1")
(make-obsolete-variable 'redisplay-dont-pause nil "24.5")
(make-obsolete-variable 'operating-system-release nil "28.1")
(make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1")
diff --git a/src/textprop.c b/src/textprop.c
index c91a2b729c6..c22b579af22 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2389,15 +2389,7 @@ returned. */);
DEFVAR_LISP ("inhibit-point-motion-hooks", Vinhibit_point_motion_hooks,
doc: /* If non-nil, don't run `point-left' and `point-entered' text properties.
-This also inhibits the use of the `intangible' text property.
-
-This variable is obsolete since Emacs-25.1. Use `cursor-intangible-mode'
-or `cursor-sensor-mode' instead. */);
- /* FIXME: We should make-obsolete-variable, but that signals too many
- warnings in code which does (let ((inhibit-point-motion-hooks t)) ...)
- Ideally, make-obsolete-variable should let us specify that only the nil
- value is obsolete, but that requires too many changes in bytecomp.el,
- so for now we'll keep it "obsolete via the docstring". */
+This also inhibits the use of the `intangible' text property. */);
Vinhibit_point_motion_hooks = Qt;
DEFVAR_LISP ("text-property-default-nonsticky",