]> git.eshelyaron.com Git - emacs.git/commitdiff
Treat C++ classes as defuns in C Tree-sitter mode (bug#60047)
authorDaniel Martín <mardani29@yahoo.es>
Tue, 13 Dec 2022 20:35:40 +0000 (21:35 +0100)
committerYuan Fu <casouri@gmail.com>
Wed, 14 Dec 2022 19:42:58 +0000 (11:42 -0800)
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add "class_specifier"
as a node of type "defun".

lisp/progmodes/c-ts-mode.el

index 821e8f5fd96b42c6535358a5b0e75fa521ddb52b..ff2ff63fd827e32d3b1cbf724181916151bcbf3e 100644 (file)
@@ -563,7 +563,8 @@ the subtrees."
                             "type_definition"
                             "struct_specifier"
                             "enum_specifier"
-                            "union_specifier")))
+                            "union_specifier"
+                            "class_specifier")))
 
   ;; Nodes like struct/enum/union_specifier can appear in
   ;; function_definitions, so we need to find the top-level node.