I was looking for a way to automatically generate doxygen comment blocks for functions in existing source files. While looking at the alternatives I saw a reference to an existing mechanism in SRecode that could generate the correct comments with srecode-document-insert-function-comment. After enabling the tag generation with M-x semantic-mode and SRecode with M-x srecode-minor-mode. Everything seemed to be working, the templates and tables seemed to detected the c-mode when using the SRecode debugging functions.
However, when I use the SRecode->Generate menu option, instead of a doxygen function comment, I get a plain comment as follows:
/** main --
*
*/
void main(int argc, char **argv)
I get nothing but the following messages with C-h e:
Adding srecode-insert-getset to srecode menu
Adding srecode-document-insert-comment to srecode menu
I've already tried it on other functions and tried debugging with edebug-defun but I could not make sense of the output.
Can someone suggest what other settings are necessary?
Additional details:
- GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
- Semantic 2.2
- SRecode 1.2
Update 20131009:
- retrying from different cursor positions (e.g. inside the function, on the start of the function name) produces the same results
- calling from the menu or directly calling the function produces the same results
- I have no special customizations in .emacs for either semantic or SRemote, and the modes are not enabled until I call them specifically as described above (Perhaps that's actually what's missing; is there some sort of global setting necessary?)
Update 20131012:
- retried with a different PC (with different configuration) and with the -q startup option to ignore the .emacs file. In both cases, the output was the same.
Update 20131013:
I noticed the following in the *messages* buffer after running generate for the first time. Perhaps there's a hint in there.
Adding srecode-insert-getset to srecode menu Adding srecode-document-insert-comment to srecode menu Adding srecode-insert-getset to srecode menu Adding srecode-document-insert-comment to srecode menu Compiling template default.srt... 2 templates compiled for default Templates default.srt has estimated priority of 80 Compiling template c.srt... 17 templates compiled for c-mode Templates c.srt has estimated priority of 90 Compiling template c.srt... 14 templates compiled for c-mode Templates c.srt has estimated priority of 90 Compiling template doc-default.srt... 7 templates compiled for default Templates doc-default.srt has estimated priority of 80 Auto-saving...done