emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 153dc4bd1dd: Fix cmake-ts-mode number fontification (Bug#72228)


From: Andrea Corallo
Subject: master 153dc4bd1dd: Fix cmake-ts-mode number fontification (Bug#72228)
Date: Wed, 7 Aug 2024 04:37:39 -0400 (EDT)

branch: master
commit 153dc4bd1ddf3b70f19f6cceec0a98d710534c18
Author: Randy Taylor <dev@rjt.dev>
Commit: Andrea Corallo <acorallo@gnu.org>

    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.
---
 lisp/progmodes/cmake-ts-mode.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]