emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Better encoding handling for aspell in ispell.el and flyspell.el


From: Agustin Martin
Subject: Better encoding handling for aspell in ispell.el and flyspell.el
Date: Tue, 13 Nov 2007 14:04:01 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

Hi,

There are some problems with the way emacs {ispell,flyspell}.el currently
handle encodings for aspell.

For ispell.el, when creating the dicts list from the present aspell dicts an
--encoding string is added, but this is not done for the default entries not
having an equivalent in the parsed list. For that reason no encoding is
forced for them and it is selected after current locale, which might not
match the dict encoding. For instance, that is not done for castellano8, the
old way for calling 8 bit spanish, which is not usually shipped as an aspell
alias.

Attached 'ispell.el_aspell-encoding.diff' patch tries to address this
problem by adding the --encoding string when the ispell process is started,
so is done for all dicts.

ispell.el patch [ispell.el_aspell-encoding.diff] proposed changelog entries
------------------- 8< ----------------------------------------------------
(ispell-aspell-find-dictionary): Do not set aspell encoding here.
(ispell-start-process): Explicitly set encoding here if we are using aspell.
------------------- 8< ----------------------------------------------------

The other call that should involve --encoding (currently not set) is in
flyspell.el (flyspell-large-region) function. Here, the proposed patch
also makes sure that communication with the process is done in the dict
encoding (since this only wraps the ispell process I just put a generic
regexp here) and addresses some other issues, like using
ispell-current-{personal-,}dictionary and making sure no "-d" string is
added if one is already present. Things are also rearranged in a way
closer to that of (ispell-start-process).

flyspell.el patch [flyspell.el_aspell-encoding.diff] proposed changelog entries
------------------- 8< ----------------------------------------------------
(flyspell-large-region):
 - Explicitly set encoding if we are using aspell, for process and for
   communication with the process.
 - Do not add "-d" string if one is already present.
 - Use ispell-current-dictionary and ispell-current-personal-dictionary.
 - Reorganize code.
------------------- 8< ----------------------------------------------------

-- 
Agustin

Attachment: flyspell.el_aspell-encoding.diff
Description: Text Data

Attachment: ispell.el_aspell-encoding.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]