aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodor Thornhill2023-02-15 19:21:50 +0100
committerTheodor Thornhill2023-02-15 19:23:02 +0100
commit32795309939fe0153644ce1ff100b5fc615e6ec2 (patch)
tree9d6247f1e31fd4048b56fbbcc4994864f2f40946
parentb18754bb179a1125a7de99f7e2351776669d3cfc (diff)
downloademacs-32795309939fe0153644ce1ff100b5fc615e6ec2.tar.gz
emacs-32795309939fe0153644ce1ff100b5fc615e6ec2.zip
Move block closer above declaration_list rule (bug#61531)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Move rule above the previous rule.
-rw-r--r--lisp/progmodes/c-ts-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 5337d148fc0..020f2642ac2 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -267,15 +267,15 @@ MODE is either `c' or `cpp'."
267 ((query "(for_statement update: (_) @indent)") parent-bol 5) 267 ((query "(for_statement update: (_) @indent)") parent-bol 5)
268 ((query "(call_expression arguments: (_) @indent)") parent c-ts-mode-indent-offset) 268 ((query "(call_expression arguments: (_) @indent)") parent c-ts-mode-indent-offset)
269 ((parent-is "call_expression") parent 0) 269 ((parent-is "call_expression") parent 0)
270 ;; Closing bracket. This should be before initializer_list
271 ;; (and probably others) rule because that rule (and other
272 ;; similar rules) will match the closing bracket. (Bug#61398)
273 ((node-is "}") point-min c-ts-common-statement-offset)
270 ,@(when (eq mode 'cpp) 274 ,@(when (eq mode 'cpp)
271 '(((node-is "access_specifier") parent-bol 0) 275 '(((node-is "access_specifier") parent-bol 0)
272 ;; Indent the body of namespace definitions. 276 ;; Indent the body of namespace definitions.
273 ((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset))) 277 ((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset)))
274 278
275 ;; Closing bracket. This should be before initializer_list
276 ;; (and probably others) rule because that rule (and other
277 ;; similar rules) will match the closing bracket. (Bug#61398)
278 ((node-is "}") point-min c-ts-common-statement-offset)
279 279
280 ;; int[5] a = { 0, 0, 0, 0 }; 280 ;; int[5] a = { 0, 0, 0, 0 };
281 ((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset) 281 ((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset)