Search code examples
emacscommentselisp

C Comment in Emacs - Linux Kernel Style


I'm using

(setq-default comment-style 'multi-line)

and my region comments, when doing M-;, are:

/* void main()
 * {
 *  int i;
 *  int b;
 *  printf("format string");
 * } */

But I want them to look like this:

/* 
 * void main()
 * {
 *  int i;
 *  int b;
 *  printf("format string");
 * }
 */

What do I have to change?


Solution

  • Try with:

    (setq comment-style 'extra-line)