I have many color variables defined in my css - LESS file, whose background color i like to highlight on text selection and running this elisp block.
(add-text-properties
(region-beginning)
(region-end)
'(:background (buffer-substring (region-beginning) (region-end))))
When i chose the word, #ea7600
in this LESS code and eval the above elisp code,
@rw-orange: **#ea7600**;
@rw-orange-dark: #ce6006;
@rw-orange-light: #fff5cc;
It didn't change the text's background to orange color. How can i make such a change and persist it too for all future sessions?
face
(orfont-lock-face
, depending on what you are trying to do). But why not just customize faceregion
, usingM-x customize-face RET region
? – Drew Jul 23 '16 at 0:38face
to youradd-text-properties
call, however. – Drew Jul 23 '16 at 2:17