C Comment in Emacs - Linux Kernel Style

人走茶凉 提交于 2019-12-04 10:17:18

Try with:

(setq comment-style 'extra-line)
Geyslan G. Bem

Complementing the anler answer and answering my own question.

To use the Linux Kernel commenting Style [1] in emacs, just set this variable in your .emacs/init.el:

(setq comment-style 'extra-line)

To comment/uncomment use M-; after select the region.

To fix needless comment spaces when using tabs see C Comment in Emacs - Linux Kernel Style v2.

[1] https://www.kernel.org/doc/Documentation/CodingStyle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!