summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Martín <mardani29@yahoo.es>2022-12-13 21:35:40 +0100
committerYuan Fu <casouri@gmail.com>2022-12-14 11:42:58 -0800
commit3b226b60248d47c5fbd9d04aa01d56f3222e0669 (patch)
tree7daf93bd48bfc5412d900820efe89711e226ca56
parent480f41c7deb4d3a45a862a5308950b35085f835d (diff)
downloademacs-3b226b60248.tar.gz
Treat C++ classes as defuns in C Tree-sitter mode (bug#60047)
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add "class_specifier" as a node of type "defun".
-rw-r--r--lisp/progmodes/c-ts-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 821e8f5fd96..ff2ff63fd82 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -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.