message-text-with-property

message-text-with-property is a compiled Lisp function in `message.el'.

(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.