From aba41d2c4bb4a47e2953231044f5a998ab37d82e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 4 May 2023 16:37:39 +0300 Subject: [PATCH] ; 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. --- lisp/progmodes/go-ts-mode.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index f32a2d75775..4233b115f19 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -106,8 +106,7 @@ "Go operators for tree-sitter font-locking.") (defun go-ts-mode--iota-query-supported-p () - "Returns t if the iota query is supported by the current version of -the tree-sitter-go grammar." + "Return t if the iota query is supported by the tree-sitter-go grammar." (ignore-errors (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))) (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 (string-equal "type_declaration" (treesit-node-type 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'.") (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 will be present meaning none of the indentation rules will match, because there is no parent to match against. This function determines -- 2.39.2