Major Modes Top Text
This chapter describes the Emacs commands that add, remove, or adjust indentation.
Indent current line ``appropriately'' in a mode-dependent fashion.
|M-^||Merge two lines (|
|C-M-o||Split line at point; text on the line after point becomes a new line
indented to the same column that it now starts in (|
|M-m||Move (forward or back) to the first nonblank character on the current
|C-M-\||Indent several lines to same column (|
||Shift block of lines rigidly right or left (|
|M-i||Indent from point to the next prespecified tab stop column
|M-x indent-relative||Indent from point to under an indentation point in the previous line.|
Most programming languages have some indentation convention. For Lisp code, lines are indented according to their nesting in parentheses. The same general idea is used for C code, though many details are different.
Whatever the language, to indent a line, use the
TAB command. Each
major mode defines this command to perform the sort of indentation
appropriate for the particular language. In Lisp mode,
the line according to its depth in parentheses. No matter where in the
line you are when you type
TAB, it aligns the line as a whole. In C
TAB implements a subtle and sophisticated indentation style that
knows about many aspects of C syntax.
In Text mode,
TAB runs the command
indents to the next tab stop column. You can set the tab stops with