Joel VanderWerf wrote:
> Joerg Fischer wrote:
> 
>> * Joel VanderWerf wrote:
>>
>>> The major item on my ruby-nedit wishlist, by the way, is a version of 
>>> Fill Paragraph that works well with commented blocks, like:
>>>
>>>   # Some comments
>>>   # about method foo
>>>   def foo(arg)
>>>   end
>>>
>>> I'll do it someday ...
>>
>>
>>
>> You can find it on
>> http://www.nr.no/~joachim/Niki/index.php/Macro%20Collection
> 
> 
> Hm, thanks! Looks like it will require some adaptation, but it's a good 
> starting point. If I have time to get it working, I'll post a note about 
> it here.

Actually, it was almost perfect. The one thing I didn't like was that it 
left no space between the # and the comment line text. But that can be 
fixed with these changes:

--- .neditmacro-orig    2004-03-24 18:54:59.000000000 -0800
+++ .neditmacro 2004-03-24 18:54:36.000000000 -0800
@@ -51,7 +51,7 @@
            first_quote = substring(part[i], 0, $search_end)
            part[i] = substring(part[i], $search_end, length(part[i]))
            first_quote = replace_in_string(first_quote, \
-                   "([" quote_signs "])\\s*", "\\1", "regex", "copy")
+                   "([" quote_signs "] )\\s*", "\\1", "regex", "copy")
        }

        # look for next quote
@@ -60,7 +60,7 @@
            eof_quote = $search_end
            next_quote = substring(part[i], found + 1, eof_quote)
            next_quote = replace_in_string(next_quote, \
-                   "([" quote_signs "])\\s*", "\\1", "regex", "copy")
+                   "([" quote_signs "] )\\s*", "\\1", "regex", "copy")

            if (first_quote != next_quote) {
                text = jf_para_rewrap(substring(part[i], 0, found), 
margin, first_quote,\