How can one prevent font-lock from changing the text properties
of a given portion of text? I tried (put-text-property start end
'fontified t), but C-x C-s just re-font-lock fontifies the text
in question. I also tried binding `inhibit-modification-hooks'
to t, with the same result.
There are many different ways, each one with advantages and quirks,
I can't recommend any without knowing more of what you're trying to do,
Use put-text-property to add a face to some text using the `face' property.
Prevent subsequent "erasure" of that highlighting by font-lock.
I would like to be able to, say, set a particular text property on the same
text, which would cause font-lock to ignore that text (skip over it, as if
it weren't there).
I thought that's what property `fontified' (= t) would do, but that seems
not to be the case. The Elisp manual says this about `fontified':