1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Fix cmake-ts-mode number fontification (Bug#72228)

* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--constants):
Remove "1" and "0".
(cmake-ts-mode--font-lock-settings): Match negative numbers.
This commit is contained in:
Randy Taylor 2024-08-06 20:10:52 -04:00 committed by Andrea Corallo
parent cd9a215ef0
commit 09d2125a7f

View File

@ -73,8 +73,7 @@
"Tree-sitter indent rules for `cmake-ts-mode'.")
(defvar cmake-ts-mode--constants
'("1" "ON" "TRUE" "YES" "Y" "0" "OFF" "FALSE" "NO" "N" "IGNORE"
"NOTFOUND")
'("ON" "TRUE" "YES" "Y" "OFF" "FALSE" "NO" "N" "IGNORE" "NOTFOUND")
"CMake constants for tree-sitter font-locking.")
(defvar cmake-ts-mode--keywords
@ -164,7 +163,7 @@ Check if a node type is available, then return the right font lock rules."
:language 'cmake
:feature 'number
'(((unquoted_argument) @font-lock-number-face
(:match "\\`[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'"
(:match "\\`-?[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'"
@font-lock-number-face)))
:language 'cmake