Commit 41d6044b authored by Roy Crihfield's avatar Roy Crihfield Committed by Brad King

cmake-mode.el: Add font-lock for keywords and variables

Control flow keywords will now be highlighted as such.  Variable names
will be also be recognized.  Adjust function name highlighting to work
in places other than the start of a line.
parent 7987d985
......@@ -193,9 +193,17 @@ the indentation. Otherwise it retains the same position on the line"
;; Keyword highlighting regex-to-face map.
(defconst cmake-font-lock-keywords
(list '("^[ \t]*\\([[:word:]_]+\\)[ \t]*(" 1 font-lock-function-name-face))
"Highlighting expressions for CMAKE mode."
`((,(rx-to-string `(and symbol-start
(or ,@cmake-keywords
,@(mapcar #'downcase cmake-keywords))
. font-lock-keyword-face)
(,(rx symbol-start (group (+ (or word (syntax symbol)))) ?\()
1 font-lock-function-name-face)
1 font-lock-variable-name-face t)
"Highlighting expressions for CMake mode.")
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment