]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/treesit.el (treesit-show-paren-data--categorize): Add docstring.
authorJuri Linkov <juri@linkov.net>
Tue, 22 Apr 2025 17:35:53 +0000 (20:35 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 22 Apr 2025 17:58:41 +0000 (19:58 +0200)
(bug#77906)

(cherry picked from commit 573a2c09b991df5442ab3b9984c2885011153333)

lisp/treesit.el

index c85768256f7a5c771f81d5556893b8e0f5f0068b..06500c61a0327675929fe61e0934f6d49717f643 100644 (file)
@@ -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)))