I wanted to make a derived mode for python-mode
to add custom keywords and color. So I retreived the part of the code that defines the face of the keywords and added my own keywords.
If I use an already existing face it works just fine. But I want to use custom faces so it doesn't change color if in the same time of other faces. I search how to define a face and end up with this:
(defface printr-face
'((t :foreground "red" :weight bold))
"Face for printr function"
:group 'python-print-color-faces)
the part of the code I try to apply it (inside the variable "python-font-lock-keywords") look like this:
(,(rx symbol-start (or "printr") symbol-end) . printr-face)
The printr-face
does appear in the list when I use
M-x list-faces-display
.
But the face isn't applied. M-x describe-face
see it as default.
What am I doing wrong? How can I use my newly defined face ?