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: Mon, 29 Apr 2024 10:42:23 +0300 Message-ID: <86mspcsjhc.fsf@gnu.org> References: 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="12700"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70641@debbugs.gnu.org To: =?UTF-8?Q?=EA=B9=80=ED=9D=AC=EC=84=9D?= , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 29 09:43:08 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 1s1LfI-00038t-8C for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Apr 2024 09:43:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Lew-0000Nm-KZ; Mon, 29 Apr 2024 03:42:46 -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 1s1Let-0000NR-4T for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 03:42:43 -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 1s1Les-0000gP-Rm for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 03:42:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1LfC-0004C2-GA for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 03:43: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: Mon, 29 Apr 2024 07:43:02 +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.171437658016112 (code B ref 70641); Mon, 29 Apr 2024 07:43:02 +0000 Original-Received: (at 70641) by debbugs.gnu.org; 29 Apr 2024 07:43:00 +0000 Original-Received: from localhost ([127.0.0.1]:55640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1LfA-0004Bo-3T for submit@debbugs.gnu.org; Mon, 29 Apr 2024 03:43:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1Lf4-0004Bi-Cn for 70641@debbugs.gnu.org; Mon, 29 Apr 2024 03:42:57 -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 1s1Lee-0000fK-VZ; Mon, 29 Apr 2024 03:42:28 -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=/SJGeFbZSOGcS7isOAuhILOtmEX79MZ4BqfW7gVIUQA=; b=VQrrh/Nkb4OKZBD5WuWw nmTgr2euZwXzobhX5RP6Jr2yw6wFt+qrSDKhDkthjVtXMNAG3eugYqBcY9hljVOl4+sIFQ5+JGOI7 T7wsDIgfWkfYh3ExGZY7YW+A8niBQ7sFpGgGby+LCfJHQqiB5IqqEkorx1BHSwnR7JXiCNJzIw/BL pBTPUUORpOrs6gUwbs91QHWN2zvxsjgtDkxHMMBM6QYiKWx892/NUBcRKD0SU0VX/N30R21Q4UiF0 SfGsuhXhQ4OCeGYGwW7ztsYgBjQ28/WyGXgA5eurp1BG7bMCgdrlxDEnWQfCg0DKfx6smhSu1qp0n liArHrvRi2y5oA==; In-Reply-To: (message from =?UTF-8?Q?=EA=B9=80=ED=9D=AC=EC=84=9D?= on Mon, 29 Apr 2024 11:12:35 +0900) 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:284122 Archived-At: > From: 김희석 > Date: Mon, 29 Apr 2024 11:12:35 +0900 > > > > On c-mode, deurn default-indent-new-line auto-indent and > put delimitors on multiple lines of comment. > > For example, if there is comments like this: > /** > * Comment like > * this [] > */ > When I press M-j (default-indent-new-line) on the point [], on > c-mode, emacs indent and put comment delimiter automatically > like this: > /** > * Comment like > * this > * [] > */ > However on c-ts-mode, it does not works. It indents well, but > could not find or put the comment delimiter on new line when > I press M-j. > /** > * Comment like > * this > [] > */ > On c-ts-mode, I found that the default value of variable comment-multi-line > is nil, which was t on c-mode, and above behavior is happend when I set > this value to t. When it was nil, comment become like this: > /** > * Comment like > * this *//* > [] > */ > Which is intended behavior. c-mode defines a special value for comment-line-break-function, whereas c-ts-mode does not. Yuan, can you look into adding this? > 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?