aboutsummaryrefslogtreecommitdiffstats
path: root/exec
diff options
context:
space:
mode:
authorJørgen Kvalsvik2024-10-04 21:38:33 +0200
committerYuan Fu2024-10-10 00:05:42 -0700
commite49b479f8692573379a1ee3417bdda9e1f777888 (patch)
tree6b2bcdc4175f5ce5a5883a605b2745d6f65a6696 /exec
parentf520008744b1eb71accded4108888d1f2055402e (diff)
downloademacs-e49b479f8692573379a1ee3417bdda9e1f777888.tar.gz
emacs-e49b479f8692573379a1ee3417bdda9e1f777888.zip
Fix c-ts-mode indentation for initializer lists (bug#73661)
The intentation behavior differed between c-mode/c++-mode and *-ts-mode for initializer lists where the first element was not at beginning-of-line. The anchor-prev-sibling function gave up and returned nil, but it should (probably) anchor on the first element in the initializer list, such as this: return { v1, v2, ..., y1, y2, ... }; c-ts-mode behaved better and figured out how to align, but I added a test for a similar compound literal to prevent regressions. * lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling): Anchor at first sibling unless bol is found. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New initializer list and compound literal test. Copyright-paperwork-exempt: yes
Diffstat (limited to 'exec')
0 files changed, 0 insertions, 0 deletions