c++-mode does not handle the C++17 R"delim()delim" string literals. Is there a way to mark a region (via comments?) so it will not be syntax highlighted and will not confuse the indenter?

  • The ppss parser cannot longer be used to parse that language. Maybe one could misuse font-lock-syntactic-keywords in a manner as org-mode does. I.e., specify a function instead of a regexp and use that function to put font-lock properties (e.g. font-lock-string-face) on that region. Font lock will ignore that regions in the further processing. Pityingly (most often) indentation and syntax-highlighting are treated completely different. I think this is also the case for c-mode (and c++-mode). That means one has actually two tasks to solve the problem from your question. – Tobias Jan 14 '18 at 0:17
  • Regarding your question. I don't know how to mark a region in a way that it is not syntax highlighted and not indented. I think that is the wrong approach anyway. The right approach is to fix the indentation and the font-lock mechanisms. But that is some work... – Tobias Jan 14 '18 at 1:15

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.