GNU bug report logs -
#34594
cc-mode needs to support "final" in C++ classes
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34594 in the body.
You can then email your comments to 34594 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34594
; Package
emacs
.
(Wed, 20 Feb 2019 18:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Daniel Colascione" <dancol <at> dancol.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 20 Feb 2019 18:49:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34594
; Package
emacs
.
(Wed, 20 Feb 2019 19:35:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 34594 <at> debbugs.gnu.org (full text, mbox):
> 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)))
Added tag(s) confirmed.
Request was from
Bhavin Gandhi <bhavin7392 <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Apr 2019 18:14:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#34594
; Package
emacs,cc-mode
.
(Sat, 13 Apr 2019 02:55:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 34594 <at> debbugs.gnu.org (full text, mbox):
+ 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)))
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#34594
; Package
emacs,cc-mode
.
(Sat, 13 Apr 2019 13:37:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 34594 <at> debbugs.gnu.org (full text, mbox):
Hello, Daniel.
I've fixed this in master, pretty much as you suggested.
Feel free to try out the fix, and to tell me it isn't quite working.
;-)
--
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)))
> >
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#34594
; Package
emacs,cc-mode
.
(Sat, 13 Apr 2019 13:58:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 34594 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello Alan,
Just a minor typo: In c-class-id-suffix-ws-ids-kwds, "syntactially"
Best regards,
Mauro.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#34594
; Package
emacs,cc-mode
.
(Sat, 13 Apr 2019 19:44:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 34594 <at> debbugs.gnu.org (full text, mbox):
Hello, Mauro.
On Sat, Apr 13, 2019 at 10:57:32 -0300, Mauro Aranda wrote:
> Hello Alan,
> Just a minor typo: In c-class-id-suffix-ws-ids-kwds, "syntactially"
Yes. I've fixed it now. Thanks for pointing it out.
> Best regards,
> Mauro.
--
Alan Mackenzie (Nuremberg, Germany).
Reply sent
to
Alan Mackenzie <acm <at> muc.de>
:
You have taken responsibility.
(Fri, 26 Apr 2019 14:30:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Daniel Colascione" <dancol <at> dancol.org>
:
bug acknowledged by developer.
(Fri, 26 Apr 2019 14:30:03 GMT)
Full text and
rfc822 format available.
Message #27 received at 34594-done <at> debbugs.gnu.org (full text, mbox):
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)))
> >
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 25 May 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.