From 3b226b60248d47c5fbd9d04aa01d56f3222e0669 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=ADn?= Date: Tue, 13 Dec 2022 21:35:40 +0100 Subject: [PATCH] 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". --- lisp/progmodes/c-ts-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- 2.39.2