Function: message-text-with-property
message-text-with-property is a byte-compiled function defined in
message.el.gz.
Signature
(message-text-with-property PROP &optional START END REVERSE)
Documentation
Return a list of start and end positions where the text has PROP.
START and END bound the search, they default to point-min and
point-max respectively. If REVERSE is non-nil, find text which does
not have PROP.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-text-with-property (prop &optional start end reverse)
"Return a list of start and end positions where the text has PROP.
START and END bound the search, they default to `point-min' and
`point-max' respectively. If REVERSE is non-nil, find text which does
not have PROP."
(unless start
(setq start (point-min)))
(unless end
(setq end (point-max)))
(let (next regions)
(if reverse
(while (and start
(setq start (text-property-any start end prop nil)))
(setq next (next-single-property-change start prop nil end))
(push (cons start (or next end)) regions)
(setq start next))
(while (and start
(or (get-text-property start prop)
(and (setq start (next-single-property-change
start prop nil end))
(get-text-property start prop))))
(setq next (text-property-any start end prop nil))
(push (cons start (or next end)) regions)
(setq start next)))
(nreverse regions)))