GNU bug report logs - #79438
31.0.50; incorrect c++-mode line indentation for member function template

Previous Next

Package: emacs;

Reported by: Geza Herman <geza.herman <at> gmail.com>

Date: Fri, 12 Sep 2025 18:10:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79438 <at> debbugs.gnu.org, Geza Herman <geza.herman <at> gmail.com>
Subject: bug#79438: 31.0.50; incorrect c++-mode line indentation for member function template
Date: Mon, 15 Sep 2025 19:31:05 +0000
Hello, Eli and Geza.

On Sat, Sep 13, 2025 at 09:35:39 +0300, Eli Zaretskii wrote:
> > Date: Fri, 12 Sep 2025 20:08:40 +0200
> > From: Geza Herman <geza.herman <at> gmail.com>

> > This little code, the "Foo(T);" line receives an extra level of 
> > indentation when using M-x c-indent-line-or-region:

> > struct Foo {
> >      template <typename T>
> >      Foo(T);
> > };

> > This worked correctly before, I found that 
> > 555ec43a32ea8f3675c5a9d73ca30609eeaa9013 introduced this behavior.

Geza, thanks for taking the trouble to report this bug.  It looks like
it will be fairly easy to solve, by binding an existing CC Mode line-up
function to the syntactic symbol class-field-cont.  I will look at this
more thoroughly in the coming day or two.

> Thanks, I added Alan to the discussion.

Eli, thanks, as always, for telling me about the bug!

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 4 days ago.

Previous Next


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