From: Eli Zaretskii Date: Sun, 29 Dec 2024 19:54:59 +0000 (+0200) Subject: ; * etc/NEWS: Improve recently added entries for tree-sitter. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=234528700751312228416ff7e26d29204598b6dd;p=emacs.git ; * etc/NEWS: Improve recently added entries for tree-sitter. (cherry picked from commit ce74534ef8cc46fd9fbdc9363da5994b1ae1cf58) --- diff --git a/etc/NEWS b/etc/NEWS index 913284ec3f7..cc65d7bc165 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -810,7 +810,7 @@ authorize the invoked D-Bus method (for example via polkit). ** The customization group 'wp' has been removed. It has been obsolete since Emacs 26.1. Use the group 'text' instead. -** Tree-sitter changes +** Changes in tree-sitter modes. +++ *** Indirect buffers can have their own parser list. @@ -840,22 +840,15 @@ Unlike the existing thing 'sexp' that defines both lists and atoms, 'sexp-list' defines only lists to be navigated by 'forward-sexp'. The new function 'treesit-forward-sexp-list' uses 'sexp-list' to move across lists. But to move across atoms inside the list -it uses `forward-sexp-default-function'. - -*** New function 'treesit-forward-list'. -Tree-sitter conditionally sets 'forward-list-function' for major modes -that have defined 'sexp-list' in 'treesit-thing-settings' to enable -the 'forward-list' motion command. - -*** New function 'treesit-down-list'. -Tree-sitter conditionally sets 'down-list-function' for major modes -that have defined 'sexp-list' in 'treesit-thing-settings' to enable -the 'down-list' motion command. - -*** New function 'treesit-up-list'. -Tree-sitter conditionally sets 'up-list-function' for major modes -that have defined 'sexp-list' in 'treesit-thing-settings' to enable -the 'up-list' motion command. +it uses 'forward-sexp-default-function'. + +*** New tree-sitter based functions for moving by sexp-lists. +If a major mode defines 'sexp-list' in 'treesit-thing-settings', +tree-sitter setup for these modes sets 'forward-list-function' to +'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and +'down-list-function' to 'treesit-down-list'. This enables the +'forward-list', 'up-list', and 'down-list' motion commands for those +modes. *** Tree-sitter enabled modes now properly support 'show-paren-mode'. They do that by letting 'show-paren-mode' use the results of parsing by