From: Eli Zaretskii Date: Thu, 5 Jan 2023 07:20:02 +0000 (+0200) Subject: ; Fix the doc strings of 2 treesit.el functions X-Git-Tag: emacs-29.0.90~834 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3fc6883351736126af793786e3f24938ebc6cb20;p=emacs.git ; Fix the doc strings of 2 treesit.el functions * lisp/treesit.el (treesit-parent-until, treesit-parent-while): Doc fixes. (Bug#60531) --- 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