From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: ispell.el, flyspell.el: better ispell/aspell switching
Date: Wed, 23 Apr 2008 16:40:25 -0400 [thread overview]
Message-ID: <jwv7ieoz4pa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20080421171519.GA7078@agmartin.aq.upm.es> (Agustin Martin's message of "Mon, 21 Apr 2008 19:15:19 +0200")
>>>>> "Agustin" == Agustin Martin <agustin.martin@hispalinux.es> writes:
> On Thu, Apr 17, 2008 at 09:38:51PM -0400, Stefan Monnier wrote:
>> I think it's perfectly fine to include it in ispell.el (it doesn't have
>> to be limited to the use of distro's tho, so I'd rather not use the word
>> "distro". As a general rule, variables and functions should take names
>> that describe what they do rather than in what context they'll be used)
> Thanks, I now notice that this may also be used systemwide by sysadmins
> for e.g., non-standard dicts, so removing the 'distro' word completely and
> using ``ispell-initialize-spellchecker-hook'' instead.
>>
>> > I think this is better done as currently, just in the middle, that
>> > is, after parsed aspell dicts, but before base-dicts. You do not know where
>> > things come from if things are done at the end, and if you need to check it
>> > you may end reusing half of the function.
>>
>> Is it ever necessary/important to distinguish whether it comes from the
>> base or fom the parsed dicts?
> I think that only in the function.
>> > If the problem is about using a hook there, something like
>>
>> No, the problem is the dynamically scoped variables. But if there's no
>> easy way to do without them, it's OK to use such things. Just use more
>> descriptive names, and be sure to document them in the hook's docstring.
> Thanks for all the suggestions, I am attaching updated patches. Feel free to
> change if you think there are better names or ways of doing things.
Gracias, installed with the following changelog:
* ispell.el (ispell-set-spellchecker-params): New function to make sure
right params and dictionary alists are used after spellchecker changes.
(ispell-aspell-dictionary-alist, ispell-last-program-name)
(ispell-initialize-spellchecker-hook): New variables and hook.
(ispell-find-aspell-dictionaries): Use ispell-aspell-dictionary-alist.
(ispell-maybe-find-aspell-dictionaries): Remove.
Calls replaced by (ispell-set-spellchecker-params) calls.
(ispell-have-aspell-dictionaries): Remove.
* flyspell.el: Replace ispell-maybe-find-aspell-dictionaries by
ispell-set-spellchecker-params.
Please notice the format and use of present tense.
Stefan
prev parent reply other threads:[~2008-04-23 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 12:02 ispell.el, flyspell.el: better ispell/aspell switching Agustin Martin
2008-04-15 18:00 ` Agustin Martin
2008-04-15 18:14 ` Lennart Borgman (gmail)
2008-04-15 18:40 ` Stefan Monnier
2008-04-15 18:47 ` Jason Rumney
2008-04-16 1:22 ` Stefan Monnier
2008-04-16 9:49 ` Agustin Martin
2008-04-16 15:21 ` Stefan Monnier
2008-04-17 17:56 ` Agustin Martin
2008-04-18 1:38 ` Stefan Monnier
2008-04-21 17:15 ` Agustin Martin
2008-04-23 20:40 ` Stefan Monnier [this message]
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=jwv7ieoz4pa.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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.