For example, I want to use font-lock-add-keywords highlight some keywords in source code. But the font lock system would also highlight the same words (anywhere) in the comments/docs/strings part of the source file.
Since there are functions that detects the environment of a given position, e.g. python-info-docstring-p, my question is that is it possible to use these kind of functions to have conditional font lock highlights?
Thanks in advance.
OVERRIDEin the highlighter (see(elisp) Search-based Fontification). – npostavs Mar 25 '17 at 13:40