From: Christophe Troestler Date: Sat, 2 Dec 2023 20:51:15 +0000 (+0100) Subject: rust-ts-mode--comment-docstring: Handle block doc comments X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2790b34b9535fb288bbd82ebc4da9fc9e527a954;p=emacs.git rust-ts-mode--comment-docstring: Handle block doc comments * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--comment-docstring): Handle block doc comments. Inhibit match-data modification. --- diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 1a1f6ace047..c4efea0e7d2 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -298,7 +298,7 @@ (let* ((beg (treesit-node-start node)) (face (save-excursion (goto-char beg) - (if (looking-at "//\\(?:/\\|!\\)") + (if (looking-at "/\\(?:/\\(?:/[^/]\\|!\\)\\|*\\(?:*[^*/]\\|!\\)\\)" t) 'font-lock-doc-face 'font-lock-comment-face)))) (treesit-fontify-with-override beg (treesit-node-end node)