emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 a1f88963f5d: rust-ts-mode--comment-docstring: Handle block doc


From: Dmitry Gutov
Subject: emacs-29 a1f88963f5d: rust-ts-mode--comment-docstring: Handle block doc comments
Date: Sun, 3 Dec 2023 09:12:40 -0500 (EST)

branch: emacs-29
commit a1f88963f5d185551af143c0faa7854519706858
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    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.
---
 lisp/progmodes/rust-ts-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el
index 18951a10c55..8127aa956f4 100644
--- a/lisp/progmodes/rust-ts-mode.el
+++ b/lisp/progmodes/rust-ts-mode.el
@@ -292,7 +292,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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]