Function: faceup-next-property-change
faceup-next-property-change is a byte-compiled function defined in
faceup.el.gz.
Signature
(faceup-next-property-change POS)
Documentation
Next position after POS where one of the tracked properties change.
If POS is nil, also include point-min in the search.
If last character contains a tracked property, return point-max.
See faceup-properties for a list of tracked properties.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/faceup.el.gz
(defun faceup-next-property-change (pos)
"Next position after POS where one of the tracked properties change.
If POS is nil, also include `point-min' in the search.
If last character contains a tracked property, return `point-max'.
See `faceup-properties' for a list of tracked properties."
(if (eq pos (point-max))
;; Last search returned `point-max'. There is no more to search
;; for.
nil
(if (and (null pos)
(faceup-has-any-text-property (point-min)))
;; `pos' is nil and the character at `point-min' contains a
;; tracked property, return `point-min'.
(point-min)
(unless pos
;; Start from the beginning.
(setq pos (point-min)))
;; Do a normal search. Compensate for that
;; `next-single-property-change' does not include the end of the
;; buffer, even when a property reach it.
(let ((res (faceup-next-single-property-change pos)))
(if (and (not res) ; No more found.
(not (eq pos (point-max))) ; Not already at the end.
(not (eq (point-min) (point-max))) ; Not an empty buffer.
(faceup-has-any-text-property (- (point-max) 1)))
;; If a property goes all the way to the end of the
;; buffer, return `point-max'.
(point-max)
res)))))