]> git.eshelyaron.com Git - emacs.git/commitdiff
Extract c-ts-mode--feature-list out
authorYuan Fu <casouri@gmail.com>
Fri, 8 Sep 2023 16:39:54 +0000 (09:39 -0700)
committerYuan Fu <casouri@gmail.com>
Fri, 8 Sep 2023 16:39:54 +0000 (09:39 -0700)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--feature-list): New variable.

lisp/progmodes/c-ts-mode.el

index 5b698eb09f4b26fced252ed6a7b9d9aa972106d5..02874a5a165d53cf463e3d508d8a9937d2570051 100644 (file)
@@ -496,6 +496,13 @@ NODE should be a labeled_statement.  PARENT is its parent."
 
 ;;; Font-lock
 
+(defvar c-ts-mode--feature-list
+  '(( comment definition)
+    ( keyword preprocessor string type)
+    ( assignment constant escape-sequence label literal)
+    ( bracket delimiter error function operator property variable))
+  "`treesit-font-lock-feature-list' for `c-ts-mode'.")
+
 (defvar c-ts-mode--preproc-keywords
   '("#define" "#if" "#ifdef" "#ifndef"
     "#else" "#elif" "#endif" "#include")
@@ -1214,10 +1221,7 @@ BEG and END are described in `treesit-range-rules'."
                    c-ts-mode--defun-for-class-in-imenu-p nil))))
 
   (setq-local treesit-font-lock-feature-list
-              '(( comment definition)
-                ( keyword preprocessor string type)
-                ( assignment constant escape-sequence label literal)
-                ( bracket delimiter error function operator property variable))))
+              c-ts-mode-feature-list))
 
 (defvar treesit-load-name-override-list)