1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/treesit.el (treesit-show-paren-data--categorize): Add docstring.

(bug#77906)
This commit is contained in:
Juri Linkov 2025-04-22 20:35:53 +03:00
parent a7f35dc177
commit 573a2c09b9

View file

@ -4207,6 +4207,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)))