all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kelly Jones" <kelly.terry.jones@gmail.com>
To: "Matthew Flaschen" <matthew.flaschen@gatech.edu>
Cc: emacs <help-gnu-emacs@gnu.org>
Subject: Re: Auto-spell-checking buffers when I close emacs
Date: Fri, 9 Feb 2007 20:36:24 -0700	[thread overview]
Message-ID: <26face530702091936t1a284d08ubac8d15e1fbc7b36@mail.gmail.com> (raw)
In-Reply-To: <45CD3826.3090001@gatech.edu>

On 2/9/07, Matthew Flaschen <matthew.flaschen@gatech.edu> wrote:
> 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)

Thanks, Matthew. I feel really bad, because, after reading your post, I added:

(add-to-list 'kill-emacs-query-functions 'ispell-buffer)

to ~/.emacs, and that does exactly what I want. The only part I was
missing (until I read your post) was "kill-emacs-query-functions".

I overstated my request: I sometimes use emacs to edit wiki pages and
want emacs to remind me if I try to save w/o spellchecking.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.

  reply	other threads:[~2007-02-10  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-10  2:31 Auto-spell-checking buffers when I close emacs Kelly Jones
2007-02-10  3:12 ` Matthew Flaschen
2007-02-10  3:36   ` Kelly Jones [this message]
2007-02-10  3:51     ` Matthew Flaschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26face530702091936t1a284d08ubac8d15e1fbc7b36@mail.gmail.com \
    --to=kelly.terry.jones@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=matthew.flaschen@gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.