From d220893216c3c6873b2bb529628e08c526d7f4ff Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 22 Dec 2023 21:25:00 -0800 Subject: [PATCH] Fix c++-ts-mode indentation (bug#67975) * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make indent rule match precise so it doesn't match declaration_list. --- lisp/progmodes/c-ts-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index ca831a9c5f9..d069ddefa6a 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -437,7 +437,7 @@ MODE is either `c' or `cpp'." ((parent-is "function_definition") parent-bol 0) ((parent-is "pointer_declarator") parent-bol 0) - ((parent-is "declaration") parent-bol 0) + ((parent-is ,(rx bos "declaration" eos)) parent-bol 0) ((parent-is "conditional_expression") first-sibling 0) ((parent-is "assignment_expression") parent-bol c-ts-mode-indent-offset) ((parent-is "concatenated_string") first-sibling 0) -- 2.39.2