]> git.eshelyaron.com Git - emacs.git/commit
Add forward-sentence with tree sitter support (bug#60623)
authorTheodor Thornhill <theo@thornhill.no>
Sun, 8 Jan 2023 19:28:02 +0000 (20:28 +0100)
committerTheodor Thornhill <theo@thornhill.no>
Wed, 11 Jan 2023 15:26:00 +0000 (16:26 +0100)
commit37d93975780f294fd7b3fefe6281a0a36638192f
treebedee2dea254e5d0af68bcdc710d61b7e7154b0d
parent033f2cc6140d03e78403f37689b9f54b64bded01
Add forward-sentence with tree sitter support (bug#60623)

* etc/NEWS: Mention the new changes.
* lisp/textmodes/paragraphs.el (forward-sentence-default-function):
Move old implementation to its own function.
(forward-sentence-function): New defvar defaulting to old behavior.
(forward-sentence): Use the variable in this function unconditionally.
* lisp/treesit.el (treesit-sentence-type-regexp): New defvar.
(treesit-forward-sentence): New defun.
(treesit-major-mode-setup): Conditionally set
forward-sentence-function.
* doc/emacs/programs.texi (Defuns): Add new subsection.
(Moving by Sentences): Add some documentation with xrefs to the elisp
manual and related nodes.
* doc/lispref/positions.texi (List Motion): Mention
treesit-sentence-type-regexp and describe how to enable this
functionality.
doc/emacs/programs.texi
doc/emacs/text.texi
doc/lispref/positions.texi
etc/NEWS
lisp/textmodes/paragraphs.el
lisp/treesit.el