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

trouble with string literals #25

Open
kookjr opened this issue May 27, 2019 · 2 comments
Open

trouble with string literals #25

kookjr opened this issue May 27, 2019 · 2 comments

Comments

@kookjr
Copy link

kookjr commented May 27, 2019

I'm using stock Ubuntu 18.04. I creates a simple setup without any of my init, and I cannot get the color of this small c++ program to work correctly.

#include <string>
std::string a = R"raw(Hi there I'm a Qoute " guy)raw";
int main(){}

Everything after the end double quote on line 2 is colored as if it were inside a string. It does not seem to recognize the double quote before guy as being inside the string.

I'm running emacs like this:

emacs -q --load testinit.el

the contents of my init file (testinit.el) are:

(add-to-list 'load-path "/home/mat/tmp/cppfl/modern-cpp-font-lock")
(require 'modern-cpp-font-lock)
(modern-c++-font-lock-global-mode t)

I've cloned a copy or your repo here, at revision 02f1047. The test directory, /home/mat/tmp/cppfl, looks like:

a.out
modern-cpp-font-lock/
t.cpp
t.cpp~
testinit.el

I'm on emacs 25.2.2.

@oschonrock
Copy link

Not sure if related, but similarly for this:

     constexpr auto operator""m(unsigned long long l) { return quantity<metre, std::int64_t>(l); }                                                                                                                                                                                                                                                                  

which is trying to define a UDL in this library

https://github.com/mpusz/units

@ludwigpacifici
Copy link
Owner

Hello,

Thanks for the detailed issue. I had a quick look and I see no issue (correct me if I am wrong):

str

I use recent version of Emacs 28.

Have a look at #20. It seems a similar issue and should be fixed in recent Emacs version.

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

3 participants