I am writing a small mode for HTML / PHP templates.
I have var with php keywords
(defvar web-mode-php-keywords
'("array" "as" "break" "catch" "continue")
"PHP keywords.")
This var is used to lock the font as follows:
(defvar web-mode-php-font-lock-keywords
(list
(cons (concat "\\<\\(" (regexp-opt web-mode-php-keywords) "\\)\\>") 'web-mode-keyword-face)
...
I can’t find a way to add the user to the list web-mode-php-keywordsin his.emacs
web-mode-php-font-lock-keywordsrelies on web-mode-php-keywordsand trying to change web-mode-php-keywordsthe hook does not work because it is web-mode-php-font-lock-keywordsalready built
I think I missed something ... (is this related to eval-after-load?)
source
share