This section describes the commands to check the spelling of a single word or of a portion of a buffer. These commands work with the spelling checker program Ispell, which is not part of Emacs.
To check the spelling of the word around or next to point, and
optionally correct it as well, use the command M-$
ispell-word). If the word is not correct, the command offers
you various alternatives for what to do about it.
To check the entire current buffer, use M-x ispell-buffer. Use M-x ispell-region to check just the current region. To check spelling in an email message you are writing, use M-x ispell-message; that checks the whole buffer, but does not check material that is indented or appears to be cited from other messages.
Each time these commands encounter an incorrect word, they ask you what to do. It displays a list of alternatives, usually including several "near-misses"---words that are close to the word being checked. Then you must type a character. Here are the valid responses:
query-replaceso you can replace it elsewhere in the buffer if you wish.
ispell-complete-word, which is bound to the key
M-TAB in Text mode and related modes, shows a list of
completions based on spelling correction. Insert the beginning of a
word, and then type M-TAB; the command displays a completion
list window. To choose one of the completions listed, click
Mouse-2 on it, or move the cursor there in the completions window
and type RET. See section Text Mode.
Once started, the Ispell subprocess continues to run (waiting for something to do), so that subsequent spell checking commands complete more quickly. If you want to get rid of the Ispell process, use M-x ispell-kill-ispell. This is not usually necessary, since the process uses no time except when you do spelling correction.
Ispell uses two dictionaries: the standard dictionary and your private
dictionary. The variable
ispell-dictionary specifies the file
name of the standard dictionary to use. A value of
nil says to
use the default dictionary. The command M-x
ispell-change-dictionary sets this variable and then restarts the
Ispell subprocess, so that it will use a different dictionary.