; Fix recently-added documentation
* etc/NEWS: * lisp/treesit.el (treesit-toggle-sexp-mode): Fix wording of recently-added documentation.
This commit is contained in:
parent
99a2cb05a4
commit
b205d7b59d
2 changed files with 16 additions and 13 deletions
15
etc/NEWS
15
etc/NEWS
|
|
@ -538,13 +538,14 @@ This variable has no effect when Transient Mark mode is off.
|
|||
** Tree-sitter
|
||||
|
||||
*** New command 'treesit-toggle-sexp-mode'.
|
||||
It toggles the mode of navigation for such sexp and list commands as
|
||||
'treesit-forward-sexp', 'treesit-forward-list', 'treesit-down-list',
|
||||
'treesit-up-list'.
|
||||
In sexp mode these commands navigate purely by treesit nodes
|
||||
defined by the thing ‘sexp’.
|
||||
In list mode they navigate using syntax tables for symbols
|
||||
and using the treesit thing ‘list’ for lists.
|
||||
It toggles the mode of navigation for commands that move across sexp's
|
||||
and lists, such as 'treesit-forward-sexp', 'treesit-forward-list',
|
||||
'treesit-down-list', and 'treesit-up-list'. This mode can be either
|
||||
'list', the default, or 'sexp'.
|
||||
In the default 'list' mode these commands move using syntax tables for
|
||||
symbols and using the thing 'list' for lists.
|
||||
In 'sexp' mode these commands move by treesit-defined parser nodes
|
||||
defined by the treesit thing 'sexp' as determined by 'treesit-thing-at'.
|
||||
|
||||
---
|
||||
** Text mode
|
||||
|
|
|
|||
|
|
@ -3190,16 +3190,18 @@ ARG is described in the docstring of `up-list'."
|
|||
|
||||
(defun treesit-toggle-sexp-mode ()
|
||||
"Toggle the mode of navigation for sexp and list commands.
|
||||
This mode toggle affects such navigation commands as
|
||||
This mode toggle affects navigation commands such as
|
||||
`treesit-forward-sexp', `treesit-forward-list', `treesit-down-list',
|
||||
`treesit-up-list'.
|
||||
|
||||
The list mode uses the `list' thing defined in `treesit-thing-settings'.
|
||||
In this mode commands use syntax definition to navigate symbols and
|
||||
treesit definition to navigate lists.
|
||||
The mode can be `list' (the default) or `sexp'.
|
||||
|
||||
The sexp mode uses the `sexp' thing defined in `treesit-thing-settings'.
|
||||
In this mode commands use the treesit definition only
|
||||
The `list' mode uses the `list' thing defined in `treesit-thing-settings'.
|
||||
See `treesit-thing-at-point'. In this mode commands use syntax tables to
|
||||
navigate symbols and treesit definition to navigate lists.
|
||||
|
||||
The `sexp' mode uses the `sexp' thing defined in `treesit-thing-settings'.
|
||||
In this mode commands use only the treesit definition of parser nodes,
|
||||
without distinction between symbols and lists."
|
||||
(interactive)
|
||||
(if (not (treesit-thing-defined-p 'list (treesit-language-at (point))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue