From 3fc6883351736126af793786e3f24938ebc6cb20 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 5 Jan 2023 09:20:02 +0200 Subject: [PATCH] ; Fix the doc strings of 2 treesit.el functions * lisp/treesit.el (treesit-parent-until, treesit-parent-while): Doc fixes. (Bug#60531) --- lisp/treesit.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index ed0aa1c8612..d6822669014 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -303,8 +303,8 @@ properties." "Return the closest parent of NODE that satisfies PRED. Return nil if none was found. PRED should be a function that -takes one argument, the parent node, and return non-nil/nil for -match/no match. +takes one argument, the node to examine, and returns a boolean +value indicating whether that node is a match. If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." (let ((node (if include-node node @@ -316,7 +316,8 @@ If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." (defun treesit-parent-while (node pred) "Return the furthest parent of NODE that satisfies PRED. Return nil if none was found. PRED should be a function that -takes one argument, the parent node." +takes one argument, the node to examine, and returns a boolean +value indicating whether that node is a match." (let ((last nil)) (while (and node (funcall pred node)) (setq last node -- 2.39.2