Dmitry Gutov<dgutov@yandex.ru> writes:
branch: emacs-29
commit fbaf113bf38ee7db8416f0c0581d479c40b2d69c
Author: Christophe Troestler<Christophe.Troestler@umons.ac.be>
Commit: Dmitry Gutov<dmitry@gutov.dev>
rust-ts-mode: appropriately fontify doc strings
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): New function.
(rust-ts-mode--font-lock-settings): Use it
(https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00019.html).
[...]
+(defun rust-ts-mode--comment-docstring (node override start end &rest _args)
+ "Use the comment or documentation face appropriately for comments."
+ (let* ((beg (treesit-node-start node))
+ (end (treesit-node-end node))
+ (face (save-excursion
+ (goto-char beg)
+ (if (looking-at "///")
+ 'font-lock-doc-face
+ 'font-lock-comment-face))))
+ (treesit-fontify-with-override beg end face override start end)))
+
I think this change now produces:
In rust-ts-mode--comment-docstring:
progmodes/rust-ts-mode.el:296:61: Warning: Unused lexical argument ‘end’
This is with Emacs from master (cf11fdfd8e) on macOS.