[ESS] How to control indentation in an R function?
Michael Hannon
jm_hannon at yahoo.com
Thu Nov 26 21:57:49 CET 2009
Hi, Stephen.
> Could you try the following (I think our customize is not working)
>
> (defun myindent-ess-hook ()
> (setq ess-indent-level 4))
>
> (add-hook 'ess-mode-hook 'myindent-ess-hook)
>
>
> Put that in .emacs and restart Emacs.
Yes, that does indent by four spaces. Thanks.
Also, FYI, I ran the Emacs "describe-variable" function as indicated in the
appended text. It appears that Emacs "sees" the value of 4 that I set, but
it's using a local value of 2. I was unable to find a way to override that
local value.
-- Mike
ess-indent-level is a variable defined in `ess-cust.el'.
Its value is 2
Local in buffer scratch.r; global value is 4
Documentation:
*Indentation of S statements with respect to containing block.
You can customize this variable.
More information about the ESS-help
mailing list