Thanks your reply. I totally agree with your option. But it is good to have
this feature, since people are lazy, like me. Apparently I put a explicit
prefix "##' " under the ess-mode-hook to avoid that.

         (setq adaptive-fill-first-line-regexp
           "##' "
           adaptive-fill-regexp
           "##' ")


This works well but I am not good at regular expressions. So this workaround
could not determine the prefix like "##'" plus some indents. Maybe people
here can help me with this:).

There is another issue that C-c C-o has destroyed my indents inside the
comments. I would love to have an option to only update the parameters but
keep the current indents. Hope this can be fixed in the new release:)


Feng




On Sat, Sep 11, 2010 at 12:54 AM, Henning Redestig <
henning.red@googlemail.com> wrote:

> 2010/9/11 Feng Li <feng.li@stat.su.se>:
> > I started to use Roxygen to document my R code and everything is perfect.
>  I
> > turned auto-fill-mode on under the ess-mode-hook. When I use the usual
> > commenting style "##" the auto fill mode dose exactly what I want -- It
> > starts a new line and add "##" in font of this line after the 70th column
> as
> > I am typing. But the auto-fill mode gives me something like this when if
> I
> > am using Roxygen style of commenting.
> >
> > ##' I am typing a very long sentence and after 70th column I'd like to
> start
> >
> > ##a new line that begins with double pound signs and an apostrophe but...
> >
> > Any suggestions to fix this? BTW, I have ESS 5.11 and Emacs 23.2
> installed.
>
> I think auto-fill-mode is convenient for editing normal text but not
> so much for source code (can give unwanted behavior) so I would
> suggest to turn that off again and then when your line starts to get
> long just hit M-q to get "##' " at the start of the wrapped lines. You
> can also do C-c C-o to "clean" a the whole roxygen entry to wrap all
> lines and update @param fields from the function definition.
>
>
> --
> /Henning Redestig
>
> Metabolome Informatics Unit | Yokohama RIKEN Plant Science Center
>



-- 
Feng Li
Department of Statistics
Stockholm University
106 91 Stockholm, Sweden
http://feng.li/

	[[alternative HTML version deleted]]

