[ESS] Auto-fill mode and Roxygen
henning.red at googlemail.com
Wed Sep 22 02:41:04 CEST 2010
2010/9/11 Feng Li <feng.li at 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
> "##' "
> "##' ")
> 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?
(setq adaptive-fill-regexp (concat ess-roxy-str adaptive-fill-regexp))
(setq adaptive-fill-first-line-regexp (concat ess-roxy-str
(setq paragraph-start (concat "\\(" ess-roxy-str "\\)*" paragraph-start))
(setq paragraph-separate (concat "\\(" ess-roxy-str "\\)*" paragraph-separate))
Metabolome Informatics Unit | Yokohama RIKEN Plant Science Center
More information about the ESS-help