aboutsummaryrefslogtreecommitdiffstats
path: root/java/debug.sh
diff options
context:
space:
mode:
authorJørgen Kvalsvik2024-11-19 08:01:01 +0100
committerYuan Fu2024-12-01 17:53:21 -0800
commitc65c5d02224335562be7e04dd1bf185dfca3dbf1 (patch)
tree83c7fe53580c6db7a7b26ba9bcffd9a94d6fdae0 /java/debug.sh
parent4afd1eca3662eda052d0017f83b4baa1f6131e8b (diff)
downloademacs-c65c5d02224335562be7e04dd1bf185dfca3dbf1.tar.gz
emacs-c65c5d02224335562be7e04dd1bf185dfca3dbf1.zip
Improve c-ts-mode compound indents (bug#74507)
Properly indent the body of compound expressions, even when then compound expression is not at the beginning of line and the parent is not an if/for/while/etc., and matches the behavior of c-mode. This fixes a problem that is common with macros and in testing frameworks. For example, you expect this to indent: TEST_CASE(1) { assert (...); } If the compound statement is the function body itself, don't apply this new rule and instead guide by the parent and first sibling. I'm sure there are subtle interactions that aren't handled properly by checking for "function_definition" rather than something more general, but it does fix the test case and the check can be improved as more cases are found. * lisp/progmodes/c-ts-mode.el: (c-ts-mode--parent-is-not-top-compound): New function. (c-ts-mode--indent-styles): Use it. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New compound statement test.
Diffstat (limited to 'java/debug.sh')
0 files changed, 0 insertions, 0 deletions