Browse Source

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.
Roy Crihfield 10 năm trước cách đây
mục cha
commit
64e6bc5ca3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Auxiliary/cmake-mode.el

+ 1 - 1
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.")