]> git.eshelyaron.com Git - emacs.git/commit
New variable 'comment-setup-function' for multi-language modes.
authorJuri Linkov <juri@linkov.net>
Mon, 5 May 2025 16:57:29 +0000 (19:57 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 08:50:46 +0000 (10:50 +0200)
commita554aaa3db12b684b24fc103ee3efccdc5cfbb5b
tree82c00dc93d59c5253cebc5d2a1e124fa2275114d
parentd581bdf0e1b51295bac2c3cca18368b3b992fc7a
New variable 'comment-setup-function' for multi-language modes.

* lisp/newcomment.el (comment-setup-function): New variable.
(comment-normalize-vars): Call non-nil 'comment-setup-function'.

* lisp/textmodes/mhtml-ts-mode.el
(mhtml-ts-mode--comment-current-lang): New internal variable.
(mhtml-ts-mode--comment-setup): New function.
(mhtml-ts-mode): Set 'comment-setup-function' to
'mhtml-ts-mode--comment-setup' instead of using
'c-ts-common-comment-setup' only for JavaScript.

https://lists.gnu.org/archive/html/emacs-devel/2025-05/msg00025.html
(cherry picked from commit 61cb73a2dbe756b060d4256c3b7ebe09f71ed2b7)
lisp/newcomment.el
lisp/textmodes/mhtml-ts-mode.el