My font-lock-warning-face
has a red color. Which works well in almost all circumstances, it is very pronounced.
The problem is, my font-lock-string-face
has orange color. So warnings inside strings are hardly visible, because orange is similar to red. For example, it is hard to notice a regexp problem around \
.
Is it possible to have a different foreground color in font-lock-warning-face
, if the warning is inside a string?
Look at this screen shot, here the \
has a different color, which is hardly noticable. I'd like to use a very different warning color (maybe a red background color) in this case (I don't want to change my string color, neither my global warning color).
lisp-interaction-mode
; or, perhapsemacs-lisp-mode
? The solution may need to be custom tailored to that major-mode and/or minor-mode (if applicable).emacs-lisp-mode
. But if I manage to get a solution, I may extend this to c-mode, for example (like marking invalid escape sequences, format specifiers in strings).