Finally figured it out. The answer is that the override parameter in the sort rule must be set to t, which means that the person will override the line face. See the documentation for the variable "font-lock-keywords" for more details. Here is an example:
(define-derived-mode temp-mode fundamental-mode "Temp" "Temporary major mode." (set (make-local-variable 'font-lock-defaults) '((temp-mode-font-lock-keywords) nil nil nil nil))) (defconst temp-mode-font-lock-keywords (list (list "$[A-Za-z0-9]+" 0 font-lock-variable-name-face t)))
debeige
source share