Indenting Source Code in Emacs
Most Emacs programming modes include automatic indentation facilities. If you press the tab key on any line, Emacs pushes the line into an appropriate place according to the structure of the code around it.
In most cases, the amount of indentation to use for any given line of computer source code is purely a matter of style that only human beings care about. Most programming languages use other grammatical elements, like curly brackets { and }, to represent code structure. The layout is just to make it easier for humans to follow:
for (int i=0; i < lst.length; i++) {
initializeFlubber(lst[i]);
if (isFlubberReady(lst[i])) {
print("READY #%d: %s\n", i, lst[i].desc);
}
}
destroyAllFlubbers();
Since indentation style is arbitrary, different programming communities tend to use different styles. Emacs modes have default indentation behaviors that are largely acceptable by most communities, both because the defaults were based on existing popular styles, and because the defaults tend to influence popular style because it's easier to use the default than to change it to something else.
Of course, if your community uses a different style, you can customize Emacs to do it your way.