Java-mode seems to be unindenting rather than indenting after a method declaration.
By which I mean I'd expect to see this:
class GoodExample {
public void method() {
allNicelyIndented();
noProblemsHere();
}
}
But instead get this:
class CrazyIndenting {
public void method() { // ((inclass 134) (topmost-intro 326))
whyIsThisUnindented(); // ((defun-block-intro 379))
itsMessingWithMyHead(); // ((statement 454))
}
}
M-x c-set-style RET java
and then C-x h C-M-\
confirms that it is using the java style for the whole buffer.
Using cc-modes interactive features, C-c C-s
gives the symbols I've put in comments after the wrongly formatted code, and C-c C-o
suggests default values that look sensible. (0, + and 0 in descending statement order)
Looking through my .emacs, I can't see anything that might be messing with cc-mode, so I'm a bit stuck for directions to investigate next. The unindent for the statement is less than the indent for the method declaration (2 "spaces" instead of 4), so perhaps there's some tab/space confusion?
Versions: Emacs 22.2.1, JDE 2.3.5.1 and CC-mode 5.31.5.