Next: , Previous: , Up: Indentation   [Contents][Index]


24.2 Tab Stops

Emacs defines certain column numbers to be tab stops. These are used as stopping points by TAB when inserting whitespace in Text mode and related modes (see Indentation), and by commands like M-i (see Indentation Commands). By default, tab stops are located every 8 columns. These positions are stored in the variable tab-stop-list, whose value is a list of column numbers in increasing order.

Instead of customizing the variable tab-stop-list directly, a convenient way to view and set tab stops is via the command M-x edit-tab-stops. This switches to a buffer containing a description of the tab stop settings, which looks like this:

        :       :       :       :       :       :
0         1         2         3         4
0123456789012345678901234567890123456789012345678
To install changes, type C-c C-c

The first line contains a colon at each tab stop. The numbers on the next two lines are present just to indicate where the colons are.

You can edit this buffer to specify different tab stops by placing colons on the desired columns. The buffer uses Overwrite mode (see Minor Modes). When you are done, type C-c C-c to make the new tab stops take effect. Normally, the new tab stop settings apply to all buffers. However, if you have made the tab-stop-list variable local to the buffer where you called M-x edit-tab-stops (see Locals), then the new tab stop settings apply only to that buffer. To save the tab stop settings for future Emacs sessions, use the Customize interface to save the value of tab-stop-list (see Easy Customization).

Note that the tab stops discussed in this section have nothing to do with how tab characters are displayed in the buffer. Tab characters are always displayed as empty spaces extending to the next display tab stop. See Text Display.


Next: , Previous: , Up: Indentation   [Contents][Index]