From: Randy Taylor Date: Wed, 7 Aug 2024 00:10:52 +0000 (-0400) Subject: Fix cmake-ts-mode number fontification (Bug#72228) X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~583 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09d2125a7fd9ac03bc8d381ac275db8f1589f464;p=emacs.git 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. --- diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index b70806f4c30..854adf4ade7 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -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