I am trying to set some background text properties in my Emacs buffer. For instance,
(set-text-properties pos1 pos2 '(face '(:background "cyan")))
But I cannot get it to work. I think I have a clue why it does not work:
I am also using a major mode that uses (setq font-lock-defaults '((some-font-lock-keywords)))
If I comment out that assignment to font-lock-defaults it works fine.
Here's a bit of code that you can paste into *scratch*:
(let ((inhibit-modification-hooks t))
(make-face 'temp-face)
(set-face-background 'temp-face "cyan")
(put-text-property 1 50 'face 'temp-face))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With