Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get Emacs fill-paragraph to work on inline XML code doc in my C# modules?
    primarykey
    data
    text
    <p>This question is similar to <a href="https://stackoverflow.com/questions/71788/getting-emacs-fill-paragraph-to-play-nice-with-javadoc-like-comments">Getting Emacs fill-paragraph to play nice with javadoc-like comments</a>, but for C#.</p> <p>I have comments like this:</p> <pre><code>/// &lt;summary&gt; /// 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. /// &lt;/summary&gt; /// /// &lt;remarks&gt; /// &lt;para&gt; /// If you received written explanation to the phrase "Project Gutenberg" associated /// with which you are redistributing /// Project GUTENBERG you receive specific permission. /// &lt;/para&gt; /// &lt;/remarks&gt; </code></pre> <p>And I would like fill-paragraph to fill <em>just the text</em>, and keep the markup elements on their own separate lines, eg, </p> <pre><code>/// &lt;summary&gt; /// 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. /// &lt;/summary&gt; /// /// &lt;remarks&gt; /// &lt;para&gt; /// If you received written explanation to the phrase /// "Project Gutenberg" associated with which you are /// redistributing Project GUTENBERG you receive specific /// permission. /// &lt;/para&gt; /// &lt;/remarks&gt; </code></pre> <p>I think that I need to set the paragraph-start variable. C-h v tells me its current value is:</p> <pre><code>"[ ]*\\(//+\\|\\**\\)[ ]*\\(@[a-zA-Z]+\\&gt;\\|$\\)\\|^\f" </code></pre> <p>...which is already looking pretty hairy. (I hate all the escaping reqd for emacs regexps.) I think I need a look-behind to say that the first line <em>after</em> an XML doc element (like &lt;remarks&gt;) begins a paragraph. </p> <p>I'm going to mess with it now, but does anyone have it set up to do inline code doc?</p> <hr> <p><strong>EDIT</strong>: Whoops! Emacs regexps don't do lookbehind! Ok, any other suggestions? How do I set the start of a paragraph to be the line AFTER &lt;summary&gt; or &lt;para&gt; ?</p> <blockquote> <p>ps: The fake code doc in my example above comes from a Markov Chain operation on the <a href="http://www.gutenberg.org/files/16780/16780.txt" rel="nofollow noreferrer">Gutenberg copy of the US Declaration of Independence</a>; thanks to <a href="https://stackoverflow.com/questions/1037719/how-can-i-quickly-create-large-1gb-textbinary-files-with-natural-content/1037738#1037738">this question</a> for the technique.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload