]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix c++-ts-mode indentation (bug#67975)
authorYuan Fu <casouri@gmail.com>
Sat, 23 Dec 2023 05:25:00 +0000 (21:25 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 23 Dec 2023 05:25:45 +0000 (21:25 -0800)
* 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

index ca831a9c5f9c88f7e10b63783fc73fef5554c628..d069ddefa6a7d4e4a2a3325a96e50879bd0db0bd 100644 (file)
@@ -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)