GNU bug report logs - #38545
comment-multi-line doesn't work in c-mode

Previous Next

Package: emacs;

Reported by: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>

Date: Mon, 9 Dec 2019 12:29:02 UTC

Severity: normal

Found in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
Cc: 38545 <at> debbugs.gnu.org
Subject: bug#38545: 26.1; comment-multi-line doesn't work in c-mode
Date: Fri, 30 Oct 2020 16:33:01 +0100
Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be> writes:

> Setting comment-multi-line to `t', commenting a region should “inserts no new terminator or starter.”  However, it is not the case.  For example, selecting two lines in
>
>     int main() 
>     {
>       int a;
>       int b;
>       return(0);
>     }
>
>     /* Local Variables: */
>     /* comment-style: multi-line */
>     /* comment-multi-line: t */
>     /* End: */
>
> yields
>
>       /* int a;
>        * int b; */
>
> while it should be
>
>       /* int a;
>          int b; */

I've stared at that for a while, and I can't see that comment-region has
inserted a new "terminator or starter".  It's inserted a "*" at the
start of the second line, but that's neither of those things.

So I think it's behaving as documented?

However, poking around for two minutes doesn't reveal any obvious way to
get c-mode to stop behaving like this; for instance, setting
comment-continue to something else than what it is just makes it create
single-line comments, confusingly enough.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.