From: Paul S. <ps...@gn...> - 2013-03-18 20:33:01
|
Hi all (does anyone have any pointers to an archive of this mailing list that does NOT use SF's obscene mailing list archive site?) I'm working on a codebase which uses macros to hide some loop details, including providing the open and close braces, like this: #define FOR_OPEN(T,a) { for (T...) { T *a = ...; #define FOR_CLOSE }} then in the code we have things like: FOR_OPEN(SomeType, var) statement1(var); statement2(var); FOR_CLOSE I know this is somewhat gross, but it's widespread. Obviously, cc-mode doesn't format this the way I want since it can't see the braces. Is there any capability in cc-mode to assign attributes to given keywords, such that I could tell cc-mode that FOR_OPEN() had an "open-brace" attribute, and FOR_CLOSE had a "close-brace" attribute? Or something like that? Cheers! |