GNU Emacs Manual - Text Mode

Node: Text Mode Next: Outline Mode Prev: Case Up: Text

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 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 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 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 Hooks.

Emacs provides two other modes for editing text that is to be passed
through a text formatter to produce fancy formatted printed output.

Nroff Mode The major mode for editing input to the formatter nroff.
TeX Mode The major modes for editing input to the formatter TeX.

Another mode is used for editing outlines. It allows you to view the
text at various levels of detail. You can view either the outline
headings alone or both headings and text; you can also hide some of the
headings at lower levels from view to make the high level structure more
visible.

Outline Mode The major mode for editing outlines.


Next: Outline Mode Up: Text