I need to add a text-property to the entire buffer. However, parts of the buffer might already have that property with a different value.
Q: What's the easiest way to apply a text property only to regions that don't already have it?
So far, I've been adding the properties to the content of the buffer, but I'd be willing to switch to overlays if it's way easier with overlays.
For instance, take the following buffer contents, and imagine the text in each line is saying the truth.
This text has no face.
This text has a blue-colored face.
This also has no face.
I would like to call a function like
(add-low-precedence-text-property
(point-min) (point-max) 'face 'some-red-face)
and have everything but the second line become red. (the face is just an example, I actually need this for other properties).