From: Daniel Martín Date: Tue, 13 Dec 2022 20:35:40 +0000 (+0100) Subject: Treat C++ classes as defuns in C Tree-sitter mode (bug#60047) X-Git-Tag: emacs-29.0.90~1172 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3b226b60248;p=emacs.git 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". --- 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.