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#50840: 28.0.50; Support GNU style of multiline comments in C source code Date: Fri, 01 Oct 2021 22:50:11 +0300 Message-ID: <83o888cyoc.fsf@gnu.org> References: <837df2moym.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 50840@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 01 21:51:22 2021 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 1mWOYz-0007va-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Oct 2021 21:51:21 +0200 Original-Received: from localhost ([::1]:34116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWOYy-0003iy-HS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Oct 2021 15:51:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWOYj-0003ic-NM for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 15:51:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWOYf-0002TO-Pe for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 15:51:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWOYf-0008Cy-Me for bug-gnu-emacs@gnu.org; Fri, 01 Oct 2021 15:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Oct 2021 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50840 X-GNU-PR-Package: emacs Original-Received: via spool by 50840-submit@debbugs.gnu.org id=B50840.163311785431539 (code B ref 50840); Fri, 01 Oct 2021 19:51:01 +0000 Original-Received: (at 50840) by debbugs.gnu.org; 1 Oct 2021 19:50:54 +0000 Original-Received: from localhost ([127.0.0.1]:57407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWOYX-0008Cd-Rt for submit@debbugs.gnu.org; Fri, 01 Oct 2021 15:50:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWOYW-0008CQ-8Z for 50840@debbugs.gnu.org; Fri, 01 Oct 2021 15:50:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54876) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWOYP-0002Fh-Bc; Fri, 01 Oct 2021 15:50:45 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4369 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWOYA-0007W3-TG; Fri, 01 Oct 2021 15:50:45 -0400 In-Reply-To: (message from Stefan Monnier on Fri, 01 Oct 2021 15:42:32 -0400) 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" Xref: news.gmane.io gmane.emacs.bugs:216082 Archived-At: > From: Stefan Monnier > Cc: 50840@debbugs.gnu.org, Alan Mackenzie > Date: Fri, 01 Oct 2021 15:42:32 -0400 > > > It sounds like none of the comment styles in 'comment-styles' can > > produce the style of C code comments that we use in Emacs, i.e. > > > > /* This is the first line of a multi-line comment. > > This is the final line of a multi-line comment. */ > > > > And I don't see anything in the CC Mode manual to augment that, > > either. > > I'm not sure exactly what that would mean in practice. > `comment-style` is used to comment out code rather than to write the > text of a comment. I think what you're asking for is what you get by > setting `comment-multi-line` and then writing your text (e.g. starting > with M-; and then typing the text in there, maybe with auto-fill set). The actual use case is to convert a block of comments like this: // First line // continuation line with more text, // more text. And another sentence // which continues here. to our comment style. I thought it was easy: first uncomment the region, then comment the region using the proper style. But there's no style to take a sequence of lines like this: First line continuation line with more text, more text. And another sentence which continues here. and make it look like this: /* First line continuation line with more text, more text. And another sentence which continues here. */ > If you want comment-region to produce something like the above, then > maybe a patch like the following would make sense? It's late down here, so instead of applying the patch and playing with it, let me ask you: will this patch support the above use case? > The idea is to add a new value nil to `comment-style` which would > instruct `comment-region` to refrain from adding `comment-continue` on > eachline of a multiline comment. The value nil doesn't sound like a good mnemonic. I think the style I have in mind is a multi-line style, just without the "* " leader on each line. Thanks.