next up previous
Next: Other simple manipulations Up: Deletion, insertion, and text Previous: The kill buffer.

Indentation.

Indentation generally depends on the mode of the buffer. When a buffer is associated with a `.c' or `.h' file, in particular, it is by default in C mode, in which the standard indentation referred to below is appropriate for C source programs.
TAB
indents as appropriate for the current mode. In text files, this is just an ordinary typewriter-style tab command. In C source files, it indents to the appropriate point for a standard set of indentation conventions.
LFD
is the same as RET TAB. Thus, if in typing in a C program, you end each line with LFD instead of RET, your program will be indented as you enter it.
M-;
indents for a comment according to the current mode. In C mode, this inserts /* */.
M-LFD
when used inside a comment, will close the comment, if necessary, go to a new line, and start a properly-indented comment on that line.
C-x TAB
indents the current region ``rigidly'' by ARGspaces to the right (default 4). Negative arguments indent to the left. Tabs are correctly counted as the appropriate number of blanks.
C-M- 1#1
indents the current region according to the current mode. For an improperly-indented C program, for example, this will correct all the indentation within the region.


next up previous
Next: Other simple manipulations Up: Deletion, insertion, and text Previous: The kill buffer.
David Wolfe
1998-12-15