http://cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards gives detailed advice on how to set the indentation level for C code to 4, but it took me a bit of poking around in the archives to find the (setq ess-indent-level 4) incantation for getting the R indentation right as well. It would have been helpful to have it in the R-ints manual section as well ... thanks Ben Bolker -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature Url : https://stat.ethz.ch/pipermail/r-devel/attachments/20071221/851bc573/attachment.bin
Ben Bolker wrote:> http://cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards > > gives detailed advice on how to set the indentation level for > C code to 4, but it took me a bit of poking around in the archives > to find the > > (setq ess-indent-level 4) > > incantation for getting the R indentation right as well.I'm confused. Doesn't the suggested code (add-hook 'ess-mode-hook (lambda () (ess-set-style 'C++) ... implicitly set ess-indent-level to 4? At least for me, using the suggested code gives indentation steps of 4 in R code. -- Bj?rn-Helge Mevik