]> git.eshelyaron.com Git - emacs.git/commit
Improve tree-sitter's prev-sibling indent anchor
authorYuan Fu <casouri@gmail.com>
Wed, 1 Mar 2023 21:55:53 +0000 (13:55 -0800)
committerYuan Fu <casouri@gmail.com>
Wed, 1 Mar 2023 22:07:01 +0000 (14:07 -0800)
commit6b2720778dc9531c0157bc7e773d2011bdf905e3
tree795ff38380df607c1a6c06b7699098d1e6f189f2
parentdb50545e3e9cd51dd8e6ad93034dc48d45b705e2
Improve tree-sitter's prev-sibling indent anchor

Now it handles the case where NODE is nil when indenting an empty
line: it tries to get the previous sibling nonetheless.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling):
* lisp/treesit.el (treesit-simple-indent-presets): Add an or form to
handle more cases.
lisp/progmodes/c-ts-mode.el
lisp/treesit.el