[ESS] setMethod indentation
Kevin Coombes
kevin.r.coombes at gmail.com
Fri Jun 5 16:42:36 CEST 2015
Hi,
At some point, the default behavior for indenting anonymous functions
seems to have changed, and I'd like to know what variable I have to set
in order to change it back to the old default. I notice the behavior in
various *apply functions or when is use setMethod with S4 classes. To
explain what I mean, here is the *old* (and in my opinion still desired)
behavior:
setMethod("summary", c("Prior"), function(object, ...) {
cat("Prior: ", object at cn,"\n")
print(object at vt)
})
And here is the new behavior:
setMethod("summary", c("Prior"), function(object, ...) {
cat("Prior: ", object at cn,"\n")
print(object at vt)
})
And yes, I know that putting the opening brace on a separate line can
get this behavior:
setMethod("summary", c("Prior"), function(object, ...)
{
cat("Prior: ", object at cn,"\n")
print(object at vt)
})
but I don't like that either. (And I really, really, really hope that
asking this question doesn't deteriorate into a discussion of the
one-true-way to format code in languages with braces. I'm the only
person who has to maintain this code, and I wants it how I wants it.)
Thanks for your help,
Kevin
More information about the ESS-help
mailing list