Created attachment 117989 [details] screenshot showing katepart not having this feature CURRENT BEHAVIOUR: In Katepart used in KWrite/Kate/KDevelop, the contents of C/C++ macros are all highlighted with a single colour. DESIRED BEHAVIOUR: While the current behaviour is OK for short macros, sometimes we do need to write longer ones. So it would be great if they are also highlighted like other code since anyhow they are going to be part of the code. Atom Editor has this feature. See the attachment. Am using Katepart 5.44.0 on Kubuntu Bionic.
Using Kate 18.12.3 with KDE Frameworks 5.56.0, I see code in #define macros highlightes the same as other code for *.cpp files. I remember that previous behavior was like you described, but I couldn't find the commit that changed it.
The C++ highlighter (ISO C++) highlight code inside the #define macro. Here it works well. But the C highlighter doesn't highlight code inside macros, here the behavior is like the one you describe (everything is green). The code highlighting in macros for C++ was added in: https://phabricator.kde.org/D13394 This was included in KDE Frameworks 5.49.0 (August 2018)
@Shriramana Sharma: Since this works for C++, is that good enough? If we, I think we can close this report. Otherwise, we need someone to step up with a patch.
I think we can live with it being improved in ISO C++, until somebody steps up to work on this.