From: Juri Linkov Date: Tue, 22 Apr 2025 17:35:53 +0000 (+0300) Subject: * lisp/treesit.el (treesit-show-paren-data--categorize): Add docstring. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3a765d0ca5a3d425db790ba62f2b9ef28f60f9cc;p=emacs.git * lisp/treesit.el (treesit-show-paren-data--categorize): Add docstring. (bug#77906) (cherry picked from commit 573a2c09b991df5442ab3b9984c2885011153333) --- diff --git a/lisp/treesit.el b/lisp/treesit.el index c85768256f7..06500c61a03 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -4200,6 +4200,9 @@ Expected to be called after each text change." ;;; Show paren mode (defun treesit-show-paren-data--categorize (pos &optional end-p) + "Return a list suitable for `show-paren-data-function' (which see). +If the optional argument END-P is non-nil, interpret the position POS +as belonging to the node that ends before POS (by subtracting 1 from POS)." (let* ((pred 'list) (parent (when (treesit-thing-defined-p pred (treesit-language-at (if end-p (1- pos) pos)))