bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70641: 29.1.90; default-indent-new-line cannot put comment delimiter


From: Eli Zaretskii
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

> 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.





reply via email to

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