Using ispell in emacs to Perform Spell Checking

Rob MacLeod


ispell is a powerful spell checker available on many Unix systems that will perform interactive spell checking and this document describes how to use it with emacs.

Linking ispell into emacs

To tell emacs how to access ispell, first include the following code in your .emacs file, which is located as a hidden file in your home directory (i.e., use ls -al to see it).

;========================================================================
; Add some stuff for ispell
;(autoload 'ispell-word "~/emacs/lisp/ispell.el"
(autoload 'ispell-word "ispell"
  "Check the spelling of word in buffer." t)
(global-set-key "\e$" 'ispell-word)
(autoload 'ispell-region "ispell"
  "Check the spelling of region." t)
(autoload 'ispell-buffer "ispell"
  "Check the spelling of buffer." t)
(autoload 'ispell-complete-word "ispell"
  "Look up current word in dictionary and try to complete it." t)
(autoload 'ispell-change-dictionary "ispell"
  "Change ispell dictionary." t)

Starting ispell

If you want to run ispell on a document, first read it into your buffer in emacs and then execute (i.e., M-x) the command:

   ispell buffer
If, instead, there is a region of text that you wish to check, mark the region (i.e., set-mark, typically C-spacebar) and then execute the command:
   ispell region
At the finest resolution, it also possible to have ispell check a single word. Just place the cursor in that word and execute the command
   M-$

Using ispell

ispell will start within the emacs window and find the first misspelled word, highlight the word, and then request user input via the minibuffer at the bottom of the emacs window. The options will either be the selection of an alternative spelling or a command to ignore, learn, or manually respell the word. The available commands are as follows:

`DIGIT' Select a near miss
`I' Insert into private dictionary
`A' Accept for this session
`SPC' Skip this time
`R' Replace with one or more words
`L' Lookup: search the dictionary using a regular expression

More details

For more information, see the section on ispell in the emacs manual or use the info system within emacs to look it up (i.e., C-h i and then search for ispell).

About this document ...

Using ispell in emacs to Perform Spell Checking

This document was generated using the LaTeX2HTML translator Version 99.2beta6 (1.42)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers using-ispell

The translation was initiated by Rob MacLeod on 2002-03-24


Rob MacLeod 2002-03-24