|
From: Alan M. <ac...@mu...> - 2026-01-29 15:07:14
|
Hello, Arsen.
On Thu, Jan 29, 2026 at 15:21:31 +0100, Arsen Arsenović wrote:
> Hi Alan,
> Alan Mackenzie <ac...@mu...> writes:
> > Here's a patch which should fix it. It tidies up other aspects of the
> > "leading comment" handling, too. Please try it out and let me know
> > how well it works. Thanks!
> It does appear to work, though I found it slightly unintuitive at first
> that line X+1 affects indent at line X, I understand why, so I think
> this is fine. Thank you so much!
Does it? I don't think L X+1 does affect L X. Maybe there's something
coincidental in some test cases.
I've committed the patch to CC Mode, thanks.
> It may be wise to drop in some tests of both leading and non-leading
> comments. This should prevent future regressions.
I've added a new test case to the CC Mode test suite which tests these
things. It's called comments-12.c, and looks like this:
#########################################################################
int foobar (int a,
/* bar */ int b,
/* foo */
int c);
int foobar (
/* foo */
/* bar */ int a,
/* b */ int b,
int c);
/* Local Variables: */
/* c-file-offsets: ((arglist-intro . c-lineup-arglist-intro-after-paren)) */
/* End: */
#########################################################################
> > Incidentally, I am no longer part of the Emacs project, so I don't
> > commit changes there any more. The patch is based on the CC Mode
> > repository head at https://hg.savannah.nongnu.org/hgweb/cc-mode, which
> > can be cloned from that address with $ hg clone. It should work, more
> > or less, on the Emacs repository too.
> That is unfortunate. I didn't quite follow the thread where you
> announced the departure (sorry, I'm sure you can understand, I'm quite
> busy still..).
> That is a massive loss for Emacs. Hopefully they at least pull CC-mode
> changes.
Somebody will need persuading to do this.
> Thank you once again, have a lovely day!
And yourself, too!
> --
> Arsen Arsenović
--
Alan Mackenzie (Nuremberg, Germany).
|