【发布时间】:2009-06-25 12:02:26
【问题描述】:
这个问题类似于Getting Emacs fill-paragraph to play nice with javadoc-like comments,但针对的是C#。
我有这样的cmets:
/// <summary>
/// Of these Colonies, and ought to fall themselves by sending a
/// constant state of THE unanimous
/// Declaration OF Nature and donations are legally 1.E.1.
/// </summary>
///
/// <remarks>
/// <para>
/// If you received written explanation to the phrase "Project Gutenberg" associated
/// with which you are redistributing
/// Project GUTENBERG you receive specific permission.
/// </para>
/// </remarks>
我希望填充段落只填充文本,并将标记元素保留在它们自己的单独行上,例如,
/// <summary>
/// Of these Colonies, and ought to fall themselves by
/// sending a constant state of THE unanimous Declaration
/// OF Nature and donations are legally 1.E.1.
/// </summary>
///
/// <remarks>
/// <para>
/// If you received written explanation to the phrase
/// "Project Gutenberg" associated with which you are
/// redistributing Project GUTENBERG you receive specific
/// permission.
/// </para>
/// </remarks>
我认为我需要设置段落开始变量。 C-h v 告诉我它的当前值是:
"[ ]*\\(//+\\|\\**\\)[ ]*\\(@[a-zA-Z]+\\>\\|$\\)\\|^\f"
...看起来已经很毛茸茸了。 (我讨厌 emacs 正则表达式的所有转义 reqd。)我想我需要回顾一下,第一行 after 是一个 XML doc 元素(如
我现在要搞砸了,但是有没有人设置它来做内联代码文档?
编辑:哎呀! Emacs 正则表达式不会向后看!好的,还有其他建议吗?如何将段落的开头设置为
ps:我上面示例中的虚假代码文档来自Gutenberg copy of the US Declaration of Independence 上的马尔可夫链操作;感谢this question 提供的技术。
【问题讨论】:
标签: c# .net emacs xml-documentation