]> git.eshelyaron.com Git - emacs.git/commit
Add 'treesit-forward-comment' with 'forward-comment-function'
authorJuri Linkov <juri@linkov.net>
Sat, 25 Jan 2025 18:14:15 +0000 (20:14 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 Jan 2025 18:53:26 +0000 (19:53 +0100)
commit268ecddaa77b4e7aa880580dfc4c594f33f4ba9b
treee7306abe1794bd9ce06e1777c42bfe627f9ce248
parent1693ec7254406b28fc03fd919f566c90ead8005c
Add 'treesit-forward-comment' with 'forward-comment-function'

* lisp/treesit.el (treesit-forward-comment): New function.
(treesit-major-mode-setup): Set 'forward-comment-function' to
'treesit-forward-comment' if the 'comment' thing is defined.

* src/syntax.c (forward-comment-function): New variable.
(Fforward_comment): Call the function from 'forward-comment-function'
when it's non-nil (bug#75609).

(cherry picked from commit 63df2164903e0cd6819187483a64b892aa7e0219)
etc/NEWS
lisp/treesit.el
src/syntax.c