From: Yuan Fu Date: Sat, 23 Dec 2023 05:25:00 +0000 (-0800) Subject: Fix c++-ts-mode indentation (bug#67975) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d220893216c3c6873b2bb529628e08c526d7f4ff;p=emacs.git 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. --- 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)