Go to the first, previous, next, last section, table of contents.

Comments in C Modes

C mode and related modes use a number of variables for controlling comment format.

c-block-comments-indent-p
This variable specifies how to reindent block comments. The C modes support five styles of block comments:
 style 1:    style 2 (GNU):   style 3:    style 4:    style 5:
 /*          /* Blah          /*          /*          /*
    blah        blah.  */      * blah     ** blah     blah
    blah                       * blah     ** blah     blah
    */                         */         */          */
For the styles 1 through 4, c-block-comments-indent-p should be nil (the default). If you want to use style 5, set c-block-comments-indent-p to t. This variable has no effect on the indentation of the comment-start itself or on insertion of asterisks when auto-filling C comments. It does not affect M-q either.
c-comment-only-line-offset
Extra offset for line which contains only the start of a comment. It can be either an integer or a cons cell of the form (non-anchored-offset . anchored-offset), where non-anchored-offset is the amount of offset given to non-column-zero anchored comment-only lines, and anchored-offset is the amount of offset to give column-zero anchored comment-only lines. Just an integer as value is equivalent to (val . 0).
c-comment-start-regexp
This buffer-local variable specifies how to recognize the start of a comment.
c-hanging-comment-ender-p
If this variable is nil, c-fill-paragraph leaves the comment terminator of a block comment on a line by itself. The default value is t, which always puts the comment-end delimiter `*/' at the end of the last line of the comment text.

Go to the first, previous, next, last section, table of contents.