That is exactly what I want.  Thanks!

On Wed, Sep 22, 2010 at 2:41 AM, Henning Redestig <
henning.red@googlemail.com> wrote:

> 2010/9/11 Feng Li <feng.li@stat.su.se>:
> > 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:).
>
> I had a look at this and it seems easier than I originally thought. If
> I add the following to R mode hook I get filling inside roxy entries
> in an adaptive fashion, seems to be what you are after?
>
> (make-local-variable 'adaptive-fill-regexp)
> (setq adaptive-fill-regexp (concat ess-roxy-str adaptive-fill-regexp))
> (make-local-variable 'adaptive-fill-first-line-regexp)
> (setq adaptive-fill-first-line-regexp (concat ess-roxy-str
> adaptive-fill-first-line-regexp))
> (make-local-variable 'paragraph-start)
> (setq paragraph-start (concat "\\(" ess-roxy-str "\\)*" paragraph-start))
> (make-local-variable 'paragraph-separate)
> (setq paragraph-separate (concat "\\(" ess-roxy-str "\\)*"
> paragraph-separate))
> (auto-fill-mode)
>
> --
> /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]]

