emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34594: closed (cc-mode needs to support "final" in


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34594: closed (cc-mode needs to support "final" in C++ classes)
Date: Fri, 26 Apr 2019 14:30:02 +0000

Your message dated Fri, 26 Apr 2019 14:29:03 +0000
with message-id <address@hidden>
and subject line Re: bug#34594: cc-mode needs to support "final" in C++ classes
has caused the debbugs.gnu.org bug report #34594,
regarding cc-mode needs to support "final" in C++ classes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34594: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34594
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: cc-mode needs to support "final" in C++ classes Date: Wed, 20 Feb 2019 10:33:02 -0800 User-agent: SquirrelMail/1.4.23 [SVN]
Consider this:

1 struct QueryCache final : BasePyObject, SupportsGcClear,
2                           HasDict, SupportsWeakRefs

Without the "final", line 2 is classified as inher-cont.  With the
"final", it gets topmost-intro-cont and wrong indentation.




--- End Message ---
--- Begin Message --- Subject: Re: bug#34594: cc-mode needs to support "final" in C++ classes Date: Fri, 26 Apr 2019 14:29:03 +0000 User-agent: Mutt/1.10.1 (2018-07-13)
Hello, Daniel.

The bug has been fixed, so I'm closing it.

-- 
Alan Mackenzie (Nuremberg, Germany).


On Fri, Apr 12, 2019 at 19:54:36 -0700, Daniel Colascione wrote:
> + Alan

> On 2/20/19 11:34 AM, Daniel Colascione wrote:
> >> Consider this:
> >>
> >> 1 struct QueryCache final : BasePyObject, SupportsGcClear,
> >> 2                           HasDict, SupportsWeakRefs
> >>
> >> Without the "final", line 2 is classified as inher-cont.  With the
> >> "final", it gets topmost-intro-cont and wrong indentation.
> > 
> > Proposed fix:
> > 
> > diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
> > index b4c12896f3..121888d825 100644
> > --- a/lisp/progmodes/cc-engine.el
> > +++ b/lisp/progmodes/cc-engine.el
> > @@ -12268,6 +12268,9 @@ c-guess-basic-syntax
> >                     (if (eq (char-after) ?<)
> >                         (zerop (c-forward-token-2 1 t indent-point))
> >                       t)
> > +                   (if (looking-at "final\\>[^_]")
> > +                       (c-forward-token-2 1 nil indent-point)
> > +                     t)
> >                     (eq (char-after) ?:))))
> >         (goto-char placeholder)
> >         (c-add-syntax 'inher-cont (c-point 'boi)))
> > 


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]