Emacs C/C++ 注释填充:希望注释中的段落不被合并

Emacs C/C++ comment filling: want paragraphs in comment to not be merged

本文关键字:注释 段落不 合并 希望 C++ 填充 Emacs      更新时间:2023-10-16

Input

// This is an example, a test, of what I want emacs filling, in this case of C++ comments, to do.
// This is a paragraph that needs to get filled.
//     But I want to start a new paragraph, within the same comment, that is indented,
// but not joined to the previous by filling.
//     And another.

这是我通过当前设置获得的内容。 我不要这个。它连接段落。

// This is an example, a test, of what I want emacs filling,
// in this case of C++ commentrs to do.  This is a paragraph
// that needs to get filled.  But I want to start a new
// paagraph, within the same comment, that is indented, but
// not joined the the previous by filling.  And another.

这就是我想要的

// This is an example, a test, of what I want emacs filling,
// in this case of C++ comments to do.  This is a paragraph
// that needs to get filled.
//     But I want to start a new paragraph, within the same
// comment, that is indented, but not joined to the previous
// by filling.
//     And another.

使用自适应填充。

Gnu emacs 24.1.1


有人问"emacs 如何区分你的非标准段落标记和对空格有点草率的用户?新段落的标准标记是空行。

有一些 emacs 模式可以用标准的英语缩进正确填充段落,其中新段落的第一行比附近的段落正文行有更多的缩进。

This is an example, a test, of what I want emacs filling,
in this case of non-comments to do.  This is a paragraph
that needs to get filled.
    But I want to start a new paragraph, within the same
comment, that is indented, but not joined to the previous
by filling.
    And another.

我想要的只是将其扩展到额外的缩进,通过填充前缀。

您可以通过各种正则表达式变量来控制它。 你可能可以让它做你想做的事,但它有点"艺术"。