]> git.eshelyaron.com Git - emacs.git/commit
Simplify imenu setup for {cmake,dockerfile}-ts-modes
authorRandy Taylor <dev@rjt.dev>
Thu, 25 Jan 2024 02:39:45 +0000 (21:39 -0500)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jan 2024 20:07:29 +0000 (21:07 +0100)
commitc1ed10e9dfb16ca1afbc0a0011a8de21c8a33061
tree271e48d48d7b7b5f4ecf0a30a276ed5e900afc43
parent2b72062c6560aa67918b13d2f17876998339d0a4
Simplify imenu setup for {cmake,dockerfile}-ts-modes

* lisp/progmodes/cmake-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-child, treesit-node-start, cmake-ts-mode--imenu,
cmake-ts-mode--imenu-1): Remove.
(treesit-search-subtree): Declare.
(cmake-ts-mode--function-name): New function.
(cmake-ts-mode): Use it.

* lisp/progmodes/dockerfile-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-start, dockerfile-ts-mode--imenu,
dockerfile-ts-mode--imenu-1): Remove.
(dockerfile-ts-mode--stage-name): New function.
(dockerfile-ts-mode): Use it.

(cherry picked from commit 1ef8b90ae06d698ab2ba9b43f67fde7289db2c5d)
lisp/progmodes/cmake-ts-mode.el
lisp/progmodes/dockerfile-ts-mode.el