]> git.eshelyaron.com Git - emacs.git/commit
Fix c-ts-mode indent heuristic (bug#67417)
authorYuan Fu <casouri@gmail.com>
Sun, 10 Dec 2023 09:24:25 +0000 (01:24 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Dec 2023 06:42:23 +0000 (07:42 +0100)
commit062f295e413a9302f9680e6b934abde758993d68
treea7139d86b3fc09baf883a9e5a0f5d6684514c2a4
parentfad1e687637b8f772da404f00fce7424e4d59083
Fix c-ts-mode indent heuristic (bug#67417)

This is a continuation of the first two patches for bug#67417.  The
c-ts-mode--prev-line-match heuristic we added is too broad, so for now
we are just adding a very specific heuristic for the else case.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prev-line-match): Remove function.
(c-ts-mode--else-heuristic): New function.
(c-ts-mode--indent-styles): Use c-ts-mode--else-heuristic.

(cherry picked from commit f0734e1c0d19d9f244b7ab60dcd98f8d031e3d38)
lisp/progmodes/c-ts-mode.el