Emacs/emacs/Text-Mode

From Get docs

Next: Outline Mode, Previous: Case, Up: Text   [Contents][Index]


25.8 Text Mode

Text mode is a major mode for editing files of text in a human language. Files which have names ending in the extension .txt are usually opened in Text mode (see Choosing Modes). To explicitly switch to Text mode, type M-x text-mode.

In Text mode, only blank lines and page delimiters separate paragraphs. As a result, paragraphs can be indented, and adaptive filling determines what indentation to use when filling a paragraph. See Adaptive Fill.

In Text mode, the TAB (indent-for-tab-command) command usually inserts whitespace up to the next tab stop, instead of indenting the current line. See Indentation, for details.

Text mode turns off the features concerned with comments except when you explicitly invoke them. It changes the syntax table so that apostrophes are considered part of words (e.g., ‘don't’ is considered one word). However, if a word starts with an apostrophe, it is treated as a prefix for the purposes of capitalization (e.g., M-c converts ‘'hello'’ into ‘'Hello'’, as expected).

If you indent the first lines of paragraphs, then you should use Paragraph-Indent Text mode (M-x paragraph-indent-text-mode) rather than Text mode. In that mode, you do not need to have blank lines between paragraphs, because the first-line indentation is sufficient to start a paragraph; however paragraphs in which every line is indented are not supported. Use M-x paragraph-indent-minor-mode to enable an equivalent minor mode for situations where you shouldn’t change the major mode—in mail composition, for instance.

Text mode binds M-TAB to ispell-complete-word. This command performs completion of the partial word in the buffer before point, using the spelling dictionary as the space of possible words. See Spelling. If your window manager defines M-TAB to switch windows, you can type ESC TAB or C-M-i instead.

Entering Text mode runs the mode hook text-mode-hook (see Major Modes).

The following sections describe several major modes that are derived from Text mode. These derivatives share most of the features of Text mode described above. In particular, derivatives of Text mode run text-mode-hook prior to running their own mode hooks.

Next: Outline Mode, Previous: Case, Up: Text   [Contents][Index]