Previous: Mail Aliases, Up: Commands [Contents][Index]

### 2.11 Spelling

There are two popular ways to have Emacs spell-check your messages: `ispell` and `flyspell`. `ispell` is the older and probably more popular package. You typically first write the message, and then run the entire thing through `ispell` and fix all the typos. To have this happen automatically when you send a message, put something like the following in your `.emacs` file:

    (add-hook 'message-send-hook 'ispell-message)

If you’re in the habit of writing in different languages, this can be controlled by the `ispell-message-dictionary-alist` variable:

    (setq ispell-message-dictionary-alist
          '(("^Newsgroups:.*\\bde\\." . "deutsch8")
            (".*" . "default")))

`ispell` depends on having the external ‘`ispell`’ command installed.

The other popular method is using `flyspell`. This package checks your spelling while you’re writing, and marks any mis-spelled words in various ways.

To use `flyspell`, put something like the following in your `.emacs` file:

    (defun my-message-setup-routine ()
      (flyspell-mode 1))
    (add-hook 'message-setup-hook 'my-message-setup-routine)

`flyspell` depends on having the external ‘`ispell`’ command installed.