[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto-spell-checking buffers when I close emacs
From: |
Matthew Flaschen |
Subject: |
Re: Auto-spell-checking buffers when I close emacs |
Date: |
Fri, 09 Feb 2007 22:12:38 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070103) |
Kelly Jones wrote:
> Is there any way I can get emacs to auto-spell-check all buffers when
> I hit ctrl-x ctrl-c, and only exit if either 1) everything is spelled
> correctly, or 2) I complete (or abort) the spellcheck process?
>
Here's a start I just cooked up. Add it to your .emacs file. It will
spell-check quite literally every buffer (including internal buffers
like *Messages* and Completions. I'm new to emacs and don't know a way
around that yet. aspell needs to be installed.:
;Spell check
(setq-default ispell-program-name "aspell")
(defun spell-given-buffer (buffer)
"Spell-check a given buffer"
(set-buffer buffer)
(ispell-buffer))
(defun spell-all-buffers ()
"Spell-checks all buffers"
(interactive)
(mapcar 'spell-given-buffer (buffer-list)))
(add-to-list 'kill-emacs-query-functions 'spell-all-buffers)
signature.asc
Description: OpenPGP digital signature