I am trying to find an emacs command that will auto comment the code similar to this:
Before command
if(condition){
do ...
}
After command
if(condition){
do ...
} //Matches if(condition){
I know that when the block of code between the parentheses is too big to fit on the current page, it will show me the "Matches if(condition)" part when I insert the closing brace. I however, want to select a block of code, and then execute this command in emacs so that it will put that comment there for me. Please let me know if anything is unclear and I will be glad to specify. I also apologize if this question has been asked before, however, I looked and I couldn't find it. If it has been, please point me to that question.
Thanks in advance.