lunes, octubre 11, 2010

Enable automatic spell checking in Emacs using flyspell

First you have to install the following packages:
Emacs (e.g. emacs-snapshot), aspell, and ispell.

Then, edit the .emacs file: e.g. sudo gedit (home dir)/.emacs

and add the following lines:

(add-hook 'latex-mode-hook '(lambda () (flyspell-mode t)))
(add-hook 'latex-mode-hook (function (lambda () (setq ispell-parser 'tex))))
(add-hook 'latex-mode-hook 'turn-on-reftex)
(add-hook 'latex-mode-hook 'turn-on-auto-fill)
(setq ispell-dictionary "english")
(dolist (hook '(text-mode-hook))
(add-hook hook (lambda () (flyspell-mode 1))))

No hay comentarios: