1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

; Minor doc cleanups in go-ts-mode.el

* lisp/progmodes/go-ts-mode.el (go-ts-mode--iota-query-supported-p)
(go-ts-mode--other-type-node-p, go-mod-ts-mode--in-directive-p):
Doc fixes.
This commit is contained in:
Eli Zaretskii 2023-05-04 16:37:39 +03:00
parent b42ccb2e5c
commit aba41d2c4b

View File

@ -106,8 +106,7 @@
"Go operators for tree-sitter font-locking.") "Go operators for tree-sitter font-locking.")
(defun go-ts-mode--iota-query-supported-p () (defun go-ts-mode--iota-query-supported-p ()
"Returns t if the iota query is supported by the current version of "Return t if the iota query is supported by the tree-sitter-go grammar."
the tree-sitter-go grammar."
(ignore-errors (ignore-errors
(or (treesit-query-string "" '((iota) @font-lock-constant-face) 'go) t))) (or (treesit-query-string "" '((iota) @font-lock-constant-face) 'go) t)))
@ -296,7 +295,7 @@ Return nil if there is no name or if NODE is not a defun node."
(treesit-search-subtree node "type_alias" nil nil 1))) (treesit-search-subtree node "type_alias" nil nil 1)))
(defun go-ts-mode--other-type-node-p (node) (defun go-ts-mode--other-type-node-p (node)
"Return t if NODE is a type, other than interface, struct or alias." "Return t if NODE is a type other than interface, struct, or alias."
(and (and
(string-equal "type_declaration" (treesit-node-type node)) (string-equal "type_declaration" (treesit-node-type node))
(not (go-ts-mode--interface-node-p node)) (not (go-ts-mode--interface-node-p node))
@ -325,7 +324,7 @@ Return nil if there is no name or if NODE is not a defun node."
"Tree-sitter indent rules for `go-mod-ts-mode'.") "Tree-sitter indent rules for `go-mod-ts-mode'.")
(defun go-mod-ts-mode--in-directive-p () (defun go-mod-ts-mode--in-directive-p ()
"Return non-nil if inside a directive. "Return non-nil if point is inside a directive.
When entering an empty directive or adding a new entry to one, no node When entering an empty directive or adding a new entry to one, no node
will be present meaning none of the indentation rules will match, will be present meaning none of the indentation rules will match,
because there is no parent to match against. This function determines because there is no parent to match against. This function determines