I think you can do this:
(setq myvar (apply 'propertize "mystring" (text-properties-at 0 myvar)))
I didn't find any way to use setf or some similar kind of thing to just modify the string part while preserving the properties.
I think you can do this:
(setq myvar (apply 'propertize "mystring" (text-properties-at 0 myvar)))
I didn't find any way to use setf or some similar kind of thing to just modify the string part while preserving the properties.