From 64e6bc5ca3bf15239829f18a71511df2f04181b3 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Thu, 13 Aug 2015 10:54:27 -0500 Subject: [PATCH] cmake-mode.el: Refine variable font-lock Simplify regexp for variable names, and allow more legal characters. Remove `$ *` as legal chars, and allow `- + / .` in names. --- Auxiliary/cmake-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index cf82d0971..11e33b378 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -200,7 +200,7 @@ the indentation. Otherwise it retains the same position on the line" . font-lock-keyword-face) (,(rx symbol-start (group (+ (or word (syntax symbol)))) (* blank) ?\() 1 font-lock-function-name-face) - ("\\${?\\([[:alpha:]_][[:alnum:]_]*\\|[0-9]+\\|[$*_]\\)" + (,(rx "${" (group (+(any alnum "-_+/."))) "}") 1 font-lock-variable-name-face t) ) "Highlighting expressions for CMake mode.")