]> git.eshelyaron.com Git - emacs.git/commit
Use the treesit thing 'list' with symbol property 'treesit-thing-symbol'
authorJuri Linkov <juri@linkov.net>
Fri, 10 Jan 2025 07:33:49 +0000 (09:33 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 11 Jan 2025 11:18:36 +0000 (12:18 +0100)
commitb8021c8dd1ff33a7f0acc089997f731bf9cdd6b1
treec314bdcda3abccf12eaebd603f19c307fef24e92
parent15658f11c9e177c1bff1886d0da7895507c7d49f
Use the treesit thing 'list' with symbol property 'treesit-thing-symbol'

* doc/lispref/parsing.texi (User-defined Things): Mention new
functions 'treesit-forward-list', 'treesit-down-list',
'treesit-up-list', 'treesit-show-paren-data' that use the thing
'list' with the symbol property 'treesit-thing-symbol' (bug#73404).

* lisp/treesit.el: Put the property 'treesit-thing-symbol'
on the symbol 'list'.
(treesit--forward-list-with-default, treesit-down-list)
(treesit-up-list, treesit-navigate-thing)
(treesit-show-paren-data--categorize, treesit-major-mode-setup):
Replace 'sexp-list' with 'list'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode)
(tsx-ts-mode):
* lisp/textmodes/html-ts-mode.el (html-ts-mode):
Replace 'sexp-list' with 'list'.

* src/treesit.c (treesit_traverse_validate_predicate)
(treesit_traverse_match_predicate): Check if the 'pred'
symbol has the property 'Qtreesit_thing_symbol'.
(syms_of_treesit): New symbol 'Qtreesit_thing_symbol'.

(cherry picked from commit 42a5ac3b513ff03c64c9609fc7e79c2b7932b2a4)
doc/lispref/parsing.texi
etc/NEWS
lisp/progmodes/c-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/ruby-ts-mode.el
lisp/progmodes/typescript-ts-mode.el
lisp/textmodes/html-ts-mode.el
lisp/treesit.el
src/treesit.c