Go to the first, previous, next, last section, table of contents.

Text Mode

When you edit files of text in a human language, it's more convenient to use Text mode rather than Fundamental mode. Invoke M-x text-mode to enter Text mode. In Text mode, TAB runs the function tab-to-tab-stop, which allows you to use arbitrary tab stops set with M-x edit-tab-stops (see section Tab Stops). Features concerned with comments in programs are turned off in Text mode except when explicitly invoked. The syntax table is changed so that periods are not considered part of a word, while apostrophes, backspaces and underlines are part of words.

A similar variant mode is Indented Text mode, intended for editing text in which most lines are indented. This mode defines TAB to run indent-relative (see section Indentation), and makes Auto Fill indent the lines it creates. The result is that normally a line made by Auto Filling, or by LFD, is indented just like the previous line. In Indented Text mode, only blank lines separate paragraphs--indented lines continue the current paragraph. Use M-x indented-text-mode to select this mode.

Text mode, and all the modes based on it, define M-TAB as the command ispell-complete-word, which performs completion of the partial word in the buffer before point, using the spelling dictionary as the space of possible words. See section Checking and Correcting Spelling.

Entering Text mode or Indented Text mode runs the hook text-mode-hook. Other major modes related to Text mode also run this hook, followed by hooks of their own; this includes Nroff mode, TeX mode, Outline mode and Mail mode. Hook functions on text-mode-hook can look at the value of major-mode to see which of these modes is actually being entered. See section Hooks.


Go to the first, previous, next, last section, table of contents.