all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christophe TROESTLER <Christophe.TROESTLER@umons.ac.be>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Eli Zaretskii <eliz@gnu.org>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: rust-ts-mode: appropriately fontify doc strings
Date: Sat, 2 Dec 2023 20:57:22 +0000	[thread overview]
Message-ID: <87fs0kpbke.fsf@poincare.umons.ac.be> (raw)
In-Reply-To: <fb683cfa-f0ff-d4fe-a8aa-df83328a9512@gutov.dev> (Dmitry Gutov's message of "Sat, 2 Dec 2023 19:04:32 +0200")

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On  2 December 2023 at 18:04 +01, Dmitry Gutov <dmitry@gutov.dev> wrote:
> […] And I suppose for completeness, we should also support the "block"
> versions of the outer/inner docs? […]

Sure.  Here is an updated patch (against emacs-29).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-rust-ts-mode-comment-docstring-handle-block-doc-comm.patch --]
[-- Type: text/x-diff; name="0001-rust-ts-mode-comment-docstring-handle-block-doc-comm.patch", Size: 1063 bytes --]

From ee3e6776ade9be3f396742feac688bbdf8c8c64f Mon Sep 17 00:00:00 2001
From: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Date: Sat, 2 Dec 2023 21:51:15 +0100
Subject: [PATCH] rust-ts-mode--comment-docstring: handle block doc comments
Content-Type: text/plain; charset="utf-8"

---
 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 @@ rust-ts-mode--comment-docstring
   (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)
-- 
2.42.0


  reply	other threads:[~2023-12-02 20:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 23:21 rust-ts-mode: appropriately fontify doc strings Christophe TROESTLER
2023-12-01  0:50 ` Dmitry Gutov
2023-12-01  8:25   ` Christophe TROESTLER
2023-12-01 21:38     ` Christophe TROESTLER
2023-12-01 23:58     ` Dmitry Gutov
2023-12-02  0:59       ` Christophe TROESTLER
2023-12-02  3:41       ` Yuan Fu
2023-12-02  7:55       ` Eli Zaretskii
2023-12-02 10:40         ` Christophe TROESTLER
2023-12-02 17:04           ` Dmitry Gutov
2023-12-02 20:57             ` Christophe TROESTLER [this message]
2023-12-03 14:12               ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fs0kpbke.fsf@poincare.umons.ac.be \
    --to=christophe.troestler@umons.ac.be \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.