commit 85a1cbdde59060f8f0ee56a7785f938734510ac1 from: Omar Polo date: Thu Aug 05 15:53:03 2021 UTC use font-lock-type-face for casts (str, u8, u16, u32) commit - 349fd94eff658fa6e93709ccc265abe50b8ca934 commit + 85a1cbdde59060f8f0ee56a7785f938734510ac1 blob - 13b1fbb8c51f5e8fae417f96790af237b686a37e blob + 833b2ea545e67d612d69bc8ba2edcefad1189f2b --- contrib/9ps-mode.el +++ contrib/9ps-mode.el @@ -25,13 +25,12 @@ (eval-when-compile (require 'rx)) -(defconst 9ps-keywords - '("assert" "const" "dir" "include" "proc" "str" "testing" - "u8" "u16" "u32")) - (defconst 9ps--font-lock-defaults - `(((,(rx-to-string `(: (or ,@9ps-keywords))) 0 font-lock-keyword-face) - ("\\([[:word:]]+\\)\s*(" 1 font-lock-function-name-face)))) + (let ((keywords '("assert" "const" "dir" "include" "proc" "testing")) + (types '("str" "u8" "u16" "u32"))) + `(((,(rx-to-string `(: (or ,@keywords))) 0 font-lock-keyword-face) + ("\\([[:word:]]+\\)\s*(" 1 font-lock-function-name-face) + (,(rx-to-string `(: (or ,@types))) 0 font-lock-type-face))))) (defvar 9ps-mode-syntax-table (let ((st (make-syntax-table)))