#define INIT_MACRO create(); some(); enviroment();
...
void function(){
INIT_MACRO
extra_indented();
normal_indented();
}
how do i make emacs deal correctly with the above situation when it is requested to automatically indent?
EDIT the only solution i see is to tell emacs to treat lines containing only caps, underscores and spaces as if they have a semicolon at the end... but how would i do that?
This works:
#define INIT_MACRO do { create(); some(); enviroment(); } while (0)
...
void function(){
INIT_MACRO;
extra_indented();
normal_indented();
}
It is usually better to use this trick to avoid problems when you use:
if (...)
MACRO();
else
...
and a semicolon on each line is easier to read in my opinion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With