[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flyspell-mode -- external localwords defitions?
From: |
Kevin Rodgers |
Subject: |
Re: flyspell-mode -- external localwords defitions? |
Date: |
Mon, 27 Oct 2008 22:04:55 -0600 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
Joe Casadonte wrote:
I have a set of files that I would like to have share a common set of
localworlds. It's a pain to keep copying them around from one file to
the next; is there an existing way to have an external localwords
definition?
Here's what I came up with (untested):
(defvar ispell-external-local-words-file-name nil
"If non-nil, a file containing words to accept in the current buffer.
See `ispell-words-keyword'.")
(defadvice flyspell-process-localwords (around external-local-words
activate)
"Visit `ispell-external-local-words-file-name' to find the words."
(if ispell-external-local-words-file-name
(save-current-buffer
(set-buffer (find-file-noselect ispell-external-local-words-file-name))
ad-do-it)
ad-do-it))
--
Kevin Rodgers
Denver, Colorado, USA