Function: forward-thing-for-char-property
forward-thing-for-char-property is a byte-compiled function defined in
thingatpt.el.gz.
Signature
(forward-thing-for-char-property PROPERTY &optional BACKWARD)
Documentation
Move forward to the end of the next "thing".
If BACKWARD is non-nil, move backward to the beginning of the previous
"thing" instead. Each "thing" is a region of text with the
specified text PROPERTY (or overlay) set.
Probably introduced at or before Emacs version 30.1.
Source Code
;; Defined in /usr/src/emacs/lisp/thingatpt.el.gz
(defun forward-thing-for-char-property (property &optional backward)
"Move forward to the end of the next \"thing\".
If BACKWARD is non-nil, move backward to the beginning of the previous
\"thing\" instead. Each \"thing\" is a region of text with the
specified text PROPERTY (or overlay) set."
(let ((bounds (bounds-of-thing-at-point-for-char-property property)))
(if backward
(if (and bounds (> (point) (car bounds)))
(goto-char (car bounds))
(goto-char (previous-single-char-property-change (point) property))
(unless (get-char-property (point) property)
(goto-char (previous-single-char-property-change
(point) property))))
(if (and bounds (< (point) (cdr bounds)))
(goto-char (cdr bounds))
(unless (get-char-property (point) property)
(goto-char (next-single-char-property-change (point) property)))
(goto-char (next-single-char-property-change (point) property))))))