From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 70641@debbugs.gnu.org, hskimse1@gmail.com
Subject: bug#70641: 29.1.90; default-indent-new-line cannot put comment delimiter on c-ts-mode
Date: Tue, 30 Apr 2024 14:21:53 +0300 [thread overview]
Message-ID: <86a5lbqeni.fsf@gnu.org> (raw)
In-Reply-To: <58FDF612-1502-4CF0-8FDF-8507FB29B98E@gmail.com> (message from Yuan Fu on Mon, 29 Apr 2024 21:57:18 -0700)
> From: Yuan Fu <casouri@gmail.com>
> Date: Mon, 29 Apr 2024 21:57:18 -0700
> Cc: 김희석 <hskimse1@gmail.com>,
> 70641@debbugs.gnu.org
>
> > c-mode defines a special value for comment-line-break-function,
> > whereas c-ts-mode does not. Yuan, can you look into adding this?
>
> This sounds like #70074. I’ve recently added a c-ts-mode version of comment-line-break-function on master. (That function works for any C-like language.)
Yes, I see that the master branch already has this issue fixed.
Thanks.
> >> Also, on c-mode, when I write multiple lines of comment with first line
> >> of comment is "/**", (like above examples) that block is set to have
> >> the same font-lock face as string to make it easier to read, but
> >> in c-ts-mode that behavior doesn't happen and they all have
> >> the same face.
> >
> > That's a completely separate issue, which should have been reported
> > separately. It looks like c-mode uses font-lock-doc-face in those
> > comments, not font-lock-comment-face. See the various uses of
> > c-font-lock-doc-comments in cc-fonts.el. AFAIR, these features are
> > beginning to be supported by the tree-sitter grammar itself, we just
> > need to use that in our font-lock definitions? Yuan, any comments?
>
> Some languages formally defines different kinds of comments and the grammar tend to make the distinction between them. C grammar doesn’t make that distinction, everything is just comment.
>
> That doesn’t stop us from adding a font-lock rule that fontifies /** comments in doc-face though. We can totally do that.
I think we should indeed do it.
prev parent reply other threads:[~2024-04-30 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 2:12 bug#70641: 29.1.90; default-indent-new-line cannot put comment delimiter on c-ts-mode 김희석
2024-04-29 7:42 ` Eli Zaretskii
2024-04-30 4:57 ` Yuan Fu
2024-04-30 11:21 ` Eli Zaretskii [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a5lbqeni.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=70641@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=hskimse1@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).