]> git.eshelyaron.com Git - emacs.git/commit
Cleanup preproc indent for c-ts-mode (bug#61558)
authorTheodor Thornhill <theo@thornhill.no>
Fri, 17 Feb 2023 19:46:19 +0000 (20:46 +0100)
committerTheodor Thornhill <theo@thornhill.no>
Sun, 19 Feb 2023 19:47:05 +0000 (20:47 +0100)
commitc544df4fa3f217d0039bb9cb38c809c830558c25
tree42866178c7efae24f7bb88b1d564166ab61338c6
parentd397f3d508464b1eab2d2b3b7e4c3b80aff9d536
Cleanup preproc indent for c-ts-mode (bug#61558)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make sure we
indent to great-grand-parent if inside an #ifdef...#endif block.  If
grand-parent is root node, then don't indent one step.
(c-ts-mode--preproc-offset): New helper anchor function to calculate
indent offset.
lisp/progmodes/c-ts-mode.el
test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts [new file with mode: 0644]
test/lisp/progmodes/c-ts-mode-tests.el