]> git.eshelyaron.com Git - emacs.git/commit
go-ts-mode: Use iota query only if supported (Bug#63086)
authorRandy Taylor <dev@rjt.dev>
Wed, 26 Apr 2023 15:15:45 +0000 (11:15 -0400)
committerDmitry Gutov <dmitry@gutov.dev>
Wed, 3 May 2023 21:56:19 +0000 (00:56 +0300)
commiteaf25b9c6ae4020f76a810b6920b65613ca50e5d
tree8d19f2e6ec5fc33444939102ab6d19ef42905b6b
parentcc090294d77c5d4047607d3234c304aaa1b0489c
go-ts-mode: Use iota query only if supported (Bug#63086)

iota query support was added on January 5, 2022.  To support older
versions of the tree-sitter-go grammar (like the latest tagged version,
v0.19.1, which was released on March 3, 2021), check if the query is
supported before trying to use it.

* lisp/progmodes/go-ts-mode.el (go-ts-mode--iota-query-supported-p): New
function.
(go-ts-mode--font-lock-settings): Use it.
lisp/progmodes/go-ts-mode.el