[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ispell.el, flyspell.el: better ispell/aspell switching
From: |
Stefan Monnier |
Subject: |
Re: ispell.el, flyspell.el: better ispell/aspell switching |
Date: |
Tue, 15 Apr 2008 14:40:23 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>>>> "Agustin" == Agustin Martin <address@hidden> writes:
> Hi,
> I come back with a rewritten approach for a problem in current ispell.el and
> flyspell.el when switching spellchecker in an emacs session.
> The problem is as follows, when in an emacs run aspell is used for the first
> time, ispell-dictionary-alist is filled with the aspell values, and if
> ispell-program-name is customized or changed to ispell during that emacs run
> it inherits the aspell values, thus failing if there was an aspell entry
> with the same name. Since ispell is still (rarely) needed for pseudo-encodings
> like [\'a -> รก] I think this should not happen and all ispell values should
> be restored in such case. Also current behavior is too ispell/aspell
> centric, in case support for another spellchecker is ever added.
> In the proposed attached patches (ispell-maybe-find-aspell-dictionaries) is
> replaced by (more neutral) new (ispell-set-spellchecker-params) function.
> That function will check if spellchecker is changed and fill
> ``ispell-dictionary-alist'' with the appropriate values. As written it has
> support for info provided by distros. Patches are mostly as currently used
> in Debian, with some comments rewritten, and a naive check for [:alpha:]
> used (instead of just discarding that for xemacs as in Debian). Keeping
> those xemacs checks saves me a couple of patches, please leave them there if
> possible.
This is a good change, but there are a few minor issues with it:
- ispell-spellchecker-init-pre-hook is not documented. What are
distro-override-dicts-alist and distro-fallback-dicts-alist?
- (setq ispell-last-program-name ispell-program-name) should be done
right after checking if they're equal, not at the end of the function.
- (defvar ispell-aspell-dictionary-alist...) should be before the first
use of that variable.
BTW (this is unrelated to this patch, but I just noticed it while
looking at the code): why are ispell-dictionary-alist* autoloaded?
I just tried to remove the autoloads on them and I couldn't notice any
negative effect.
Stefan
- ispell.el, flyspell.el: better ispell/aspell switching, Agustin Martin, 2008/04/04
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Agustin Martin, 2008/04/15
- Re: ispell.el, flyspell.el: better ispell/aspell switching,
Stefan Monnier <=
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Jason Rumney, 2008/04/15
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Agustin Martin, 2008/04/16
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Stefan Monnier, 2008/04/16
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Agustin Martin, 2008/04/17
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Stefan Monnier, 2008/04/17
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Agustin Martin, 2008/04/21
- Re: ispell.el, flyspell.el: better ispell/aspell switching, Stefan Monnier, 2008/04/23