I have a custom face defined as
(defface my-underlined
'((t (:underline "red")))
:group 'my-group)
At some place I underline some words with something like
(add-text-properties (match-beginning 0) (match-end 0) '(font-lock-face my-underlined)))))
What would be a correct way to revert this text properties set on some words (or on all words on demand) as well as restore their syntax highlight that might have existed before? Nothing with font-lock-
seems to work. What would be a correct way to underline and revert?
A function underline-region
doesn't seem to work. It just inserts ^H_
into the text.
(add-text-properties .. .. '(PROP VAL))
you can use(put-text-property ... 'PROP 'VAL)
.