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

20.1 Text Mode

You should use Text mode—rather than Fundamental or Lisp mode—to edit files of text in a human language. 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 unless they are explicitly invoked. The syntax table is changed so that periods are not considered part of a word, while apostrophes, backspaces and underlines are.

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. As a result, a line made by Auto Filling, or by LFD, is normally indented just like the previous line. Use M-x indented-text-mode to select this mode.

Entering Text mode or Indented Text mode calls the value of the variable text-mode-hook with no arguments, if that value exists and is not nil. This value is also called when modes related to Text mode are entered; this includes Nroff mode, TeX mode, Outline mode, and Mail mode. Your hook can look at the value of major-mode to see which of these modes is actually being entered.

Two modes similar to Text mode are of use for editing text that is to be passed through a text formatter before achieving its final readable form.

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