I recently upgraded to the new Emacs ESS version 15.03-1 and it has changed how my R code is being indented. For example,
setMethod('show','AClass',function(object) {
## do something....
indents after I hit Tab to have '##' 2 spaces after 'setMethod('. The behavior I would like is to offset 2 spaces from the start of the line like this:
setMethod('show','AClass',function(object) {
## do something....
The part of my .emacs file that deals with this is below
(require 'ess-site)
(add-hook 'ess-mode-hook
(lambda()
(ess-set-style 'C++ 'quiet)
(setq ess-indent-level 2)
(setq comment-column 2)
(setq ess-continued-statement-offset 2)
(setq ess-brace-offset 0)
(setq ess-arg-function-offset nil) ;; had been 2
(setq ess-expression-offset 4)
(setq ess-else-offset 0)
(setq ess-close-brace-offset 0)
(add-hook 'local-write-file-hooks
(lambda ()
(ess-nuke-trailing-whitespace)))
))
ess-indent-level
is obsolete and just an alias foress-indent-offset
– Andersen