emacs - Emacs 中的 C 注释 - Linux 内核风格 v2

标签 emacs elisp

我收到了关于 C Comment in Emacs - Linux Kernel Style 的答复效果很好但是

enter image description here

当 emacs 注释 (comment-dwim) 时,它会用空格填充第二个 * long_function_name_vari 和最后一个 */ 行(在注释之前)不是像我配置的那样的选项卡。如何避免这种情况?

使用这种风格发表评论有多容易?

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

最佳答案

可自定义变量comment-style在newcomment.el中定义: ...

(extra-line t   nil t   t
            "One comment for all lines, end on a line by itself")

...

这应该提供想要的结果 IIUC。

然而,当前的实现是额外的两行,开头的换行符到目前为止还没有记录。请提交功能请求。文档错误报告。

关于emacs - Emacs 中的 C 注释 - Linux 内核风格 v2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34710840/

相关文章:

ruby - 我如何在 Emacs 中使用 ruby​​-debug?

emacs - 在 elisp 中,如何将反引号应用于从文件读取的列表

Emacs 右边距的相对行号

emacs - 如何让emacs允许在不同的帧中打开一个缓冲区?

Emacs 自动完成错误 : Symbol's value as variable is void: ac-modes

shell - Emacs shell 脚本 - 如何将初始选项放入脚本中?

emacs - 在 org-mode 表和 table.el 表之间转换,无需用户交互

emacs - 在动态/按上下文自动插入之间切换

r - 如何指定emacs中ESS session 打开的R版本?

Emacs 全局设置键到 C-TAB