From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86a5lbqeni.fsf@gnu.org> References: <86mspcsjhc.fsf@gnu.org> <58FDF612-1502-4CF0-8FDF-8507FB29B98E@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28339"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70641@debbugs.gnu.org, hskimse1@gmail.com To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 30 13:23:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s1lZl-00072k-VD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Apr 2024 13:23:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1lZP-0002hs-S6; Tue, 30 Apr 2024 07:22:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1lZM-0002eI-IW for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2024 07:22:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1lZK-0006Tz-OQ for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2024 07:22:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1lZe-0004k5-0f for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2024 07:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Apr 2024 11:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70641 X-GNU-PR-Package: emacs Original-Received: via spool by 70641-submit@debbugs.gnu.org id=B70641.171447614618198 (code B ref 70641); Tue, 30 Apr 2024 11:23:01 +0000 Original-Received: (at 70641) by debbugs.gnu.org; 30 Apr 2024 11:22:26 +0000 Original-Received: from localhost ([127.0.0.1]:59377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1lZ3-0004jS-M1 for submit@debbugs.gnu.org; Tue, 30 Apr 2024 07:22:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1lYz-0004jF-99 for 70641@debbugs.gnu.org; Tue, 30 Apr 2024 07:22:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1lYZ-0006Nf-97; Tue, 30 Apr 2024 07:21:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=7ues4O+yXjB3orF2JsPrxYJWmVW2Qo9AFd7J/+DX/+s=; b=BgtS8WepS7YcP1Xu2jR0 mln0Gqu2EEYoz7fxbEMe6rd+qdj3X5V6pgpf7E5bFGeljSlJ2pYYJ8lUQLT5S7NIQqtoWrUBzq8mn F/QkU64rAC6SlRKpJghGiurkN99TQhmIs+4tla7qZQxHPeThQCfEKO7gf6E63g++jVtpwdCiTSIC1 6qyuGeRbb1GtCvVpq2EsAlMkCAWSArb9o5LFnOsKW86lTQRxFMsP2CIzc+2BNz5/5Wv0AmOlgsz1J bvVe38gsomNyjQrq0ij5JMSAm3FNO2TyB7xqAlAzXwvjW6c9p1sOWva9Qqn0Ne3gfw2f2pFc/U69N pnH6Sue3N0gU0w==; In-Reply-To: <58FDF612-1502-4CF0-8FDF-8507FB29B98E@gmail.com> (message from Yuan Fu on Mon, 29 Apr 2024 21:57:18 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284198 Archived-At: > From: Yuan Fu > Date: Mon, 29 Apr 2024 21:57:18 -0700 > Cc: 김희석 , > 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.