Here’s the normal way of adding new keywords to a mode. Let us start with the simplest example: (font-lock-add-keywords 'emacs-lisp-mode '(("foo" . font-lock-keyword-face))) It makes “foo” a keyword in EmacsLisp mode. More ExamplesHere is a simple example from the documentation of font-lock-add-keywords: (font-lock-add-keywords 'c-mode '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend) ("\\<\\