Q: how do I change text properties conditional on other properties?
I have text between region beg
and end
. Each character has
text properties. I know I can change those text properties in an
unconditional way with something like:
(add-text-properties beg end '(some-property t))
How can I change the text properties of characters conditional on their existing properties?
Here's an example. Each character in the region has two text
properties, prop1
and prop2
, that take on t
or nil
values. I want to set the value of prop1
to t
for only those
characters whose prop2
value is t
. How do I do that?