I have a question that is very similar to Getting Emacs fill-paragraph to play nice with javadoc-like comments, but I wasn't sure if I would get many answers in a year old thread.
Anyhow, I have C code that has some Doxygen comments that look like the following:
/**
* Description
*
* @param[in,out] var1 : <Long description that needs to be wrapped.>
* @param[in,out] var2 : <Description2>
*/
Now, when I use M-q in emacs, I want the following:
/**
* Description
*
* @param[in,out] var1 : <Long description that needs
* to be wrapped.>
* @param[in,out] var2 : <Description2>
*/
But, current I get the following:
/**
* Description
*
* @param[in,out] var1 : <Long description that needs
* to be wrapped.> @param[in,out] var2 : <Description2>
*/
Doing some research, it looked like I needed to set the paragraph-start variable in emacs to recognize the "@param." I found another question on stack overflow (Getting Emacs fill-paragraph to play nice with javadoc-like comments), that had a sample regular expression. I modified it a bit to fit my requirements, and I tested it inside of Search->Regex Forward, and it highlighted each @param sentence correctly.
I used the following regular expression "^\s-*\*\s-*\(@param\).*$"
So, I tried setting the given regular expression as my paragraph-start (with the added \'s required for the elisp syntax) in my .emacs file. When I opened a new emacs window and tried out the M-q, the same error was occurring. Is there something I am missing? Is M-q used differently in c-mode? Should I check my .emacs file for something that may be causing an error here? Any help would be appreciated.
Thanks, Ryan