.net - How to get Emacs fill-paragraph to work on inline XML code doc in my C# modules? -
This question is similar, but for C #
I have a comment like this:
/// & lt; Summary & gt; /// In these colonies, and should themselves declare themselves by sending an unanimous state /// continuous state /// the declaration of nature and donation is legally 1. 1. 1. /// & lt; / Summary & gt; ////// & lt; Comment & gt; /// & lt; Paragraph & gt; /// If you receive a written explanation from the phrase "Project Gutenberg", then /// with whom you are redistributing /// Project Gutenberg gives you specific permission. /// & lt; / Paragraph & gt; /// & lt; / Comment & gt;
and I would like the phrase paragraph to fill the just text , and place markup elements on their separate lines, such as
< Code> /// & lt; Summary & gt; / / In these colonies, and to declare themselves first with unanimous consent, we should send a permanent state of nature and donation to 1.E.1. /// & lt; / Summary & gt; ////// & lt; Comment & gt; /// & lt; Paragraph & gt; /// If you have received a written explanation related to the phrase /// "Project Gutenberg", then you are redistributing the project / gutenberg, you get special /// permission. /// & lt; / Paragraph & gt; /// & lt; / Comment & gt;
I think I have to set the paragraph-starting variable. Ch V tells me that its current value is:
"[] * \\ (// + \\ | \\ ** \\) [] * \\ (@ [a -zA] -Z] + \\ & gt; \\ | $ \\) \\ | ^ \ f "
... which is already looking pretty hairy (I hate all the drawings avoiding AMX Reggaeps.) I think I need to see that the first line followed by is an XML document element (such as
I'm going to mess with it, Lake Rough set for it inline code Doctor?
Edit : Whoops! Emacs do not ignore regexps! OK, any other suggestions? How do I set the beginning of the parameter and later on & lt; Summary & gt; Or & lt; Paragraph & gt; ?
ps: In my example the fake code doctor comes from a Markov chain operation; Thanks for the tech.
Try this setting:
( Setq paragraph-separated "[] * \\ (// + \\ | \\ ** \\) \\ ([] * \\ | & lt ;. * & Gt; \\) $ \\ | ^ \ F ")
This tells the paragraphs separating the paragraph, and I adapted it to include A space and a matching pair in the angle brackets. You can find what you want, it works for example provided by you.
Of course you have to set that variable in a C-mode hook, such as:
(Ad-hook 'C-mode-common-hook' (Lambda ( ) (Set paragraph-different "...")))
Comments
Post a Comment