Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"const override" is not correctly highlighted #7

Closed
adl opened this issue Oct 14, 2016 · 4 comments
Closed

"const override" is not correctly highlighted #7

adl opened this issue Oct 14, 2016 · 4 comments

Comments

@adl
Copy link

adl commented Oct 14, 2016

Thank you for this package.

Using c++-mode and modern-c++-font-lock-mode the following code

struct b : public a
{
  void foo() override;
  void foo() const override;
};

is font-locked as

comp

as if the second override was not detected as a keyword.

Would that be easy to fix?

@ludwigpacifici
Copy link
Owner

Hello @adl

Thank you for your feedback.

I am not able to reproduce your issue. Here is what I get on my side:

screenshot from 2016-10-15 09-50-48

On the left, it is my personal emacs running c++-mode and modern-c++-font-lock-mode. On the right it is emacs -Q (it is a bare emacs with no configuration) with only c++-mode is loaded.

screenshot from 2016-10-15 09-57-48

Finally the last one is emacs running text-mode (it puts away all syntax highlighting) and modern-c++-font-lock-mode.

From this, I understand that c++-mode and modern-c++-font-lock-mode both support const and override.

Can you tell me which version of emacs do you use? Also can you try to do like me (turning on and off major/minor modes) and show me what you see?

@adl
Copy link
Author

adl commented Oct 15, 2016

Hmm, interesting. For me loading modern-c++-font-lock-mode does make a difference.

M-x version says GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5) of 2016-09-05 on trouble, modified by Debian.

When I try emacs -Q foo.cc I get:

emacs-q

If I then manually load modern-c++-font-lock-mode this changes to:

emacs-qm

Apparently emacs 25.1 landed two days ago in Debian, so I'll upgrade and see if that helps.

@adl
Copy link
Author

adl commented Oct 15, 2016

Ok, so this is actually fixed by Emacs 25.1.

Sorry for the noise!

@adl adl closed this as completed Oct 15, 2016
@ludwigpacifici
Copy link
Owner

It's good you can upgrade your Emacs with the last version. You will have a newer version of the c++-mode. I expect modern-c++-font-lock-mode to support it as well.

Enjoy your coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants