[Dict-common-dev] Draft for registering aspell dicts for use under emacs
Agustín Martín Domingo
agmartin@aq.upm.es
Tue, 04 Feb 2003 14:13:34 +0100
Hi all,
This is a draft of the text to go to the policy about how to register
aspell dictionaries so they work under emacs. Still preliminary,
comments are welcome
----------------
----------------------------------------------------------------------
Registering aspell dictionaries for use from within emacs
The dictionaries-common system resets the contents of the emacs
ispell-dictionary-alist variable in ispell.el to redefine it after the
really installed dictionaries. For that reason, aspell dictionaries
cannot
trust that the values originally there are still present. A registration
system similar to that provided for ispell dictionaries is available for
aspell dictionaries. Note that for similar emacsen names the ispell
entry
will override the aspell entry, so you have to take care that your
aspell
dictionary will work with the ispell entry. To use this system,
please see
the following guidelines
----------------------------------------------------------------------
Add an info file
An info file similar to that described in the Section called The info
file must be installed as
/var/lib/dictionaries-common/aspell/<package-name>, containing one entry
for each aspell dictionary it provides.
Emacsen-Name must be the same of the equivalent ispell dictionary.
Otherwise things like ;; ispell-local-dictionary: "brasileiro" in the
spell checked file will not work similarly under ispell and aspell. As
told before you must make sure that it will work with an info file entry
similar to the ispell one.
----------------------------------------------------------------------
Modify the maintainer scripts
Add a call to update-dictcommon-aspell to your postinst
if [ "$1" = "configure" ] ; then
[ -x /usr/sbin/update-dictcommon-aspell ] &&
/usr/sbin/update-dictcommon-aspell
fi
and to your postrm
case "$1" in abort-install|purge|remove)
[ -x /usr/sbin/update-dictcommon-aspell ] &&
/usr/sbin/update-dictcommon-aspell
esac
----------------------------------------------------------------------
Set the right relationships
If you want to use this system you must make your aspell dictionary
depend on dictionaries-common (>= 0.9.1).
----------------------------------------------------------------------
Make sure your dict will work with the ispell name
When aspell is selected for use from emacs, ispell.el will call aspell
-d your_hashname, where your_hashname is the value of the Hash-Name
field
in the info file entry for your dictionary. Since this must work
with the
corresponding ispell name, make sure that something like
your_hashname.alias or a symlink to the .multi file as
your_hashname.multi
is present in the aspell lib dir.
----------------------------------------------------------------------
installdeb-aspell: a debhelper like helper for aspell dictionaries
A debhelper like script is provided to make even easier the steps above.
This helper is named installdeb-aspell and relies in the existence of an
info-aspell file conforming to the specified in the Section called The
info file, and named as for other debhelper files (.docs, .manpages,
...).
Calling it in debian/rules will install the aspell info file and create
postinst and postrm debhelper snippets to be installed by debhelper.
Note,
that, unlike installdeb-{ispell,wordlist} this script does not know
about
debconf so you should install your debconf stuff, if any, in the usual
way.
If you use this script you must make your package build depend on
dictionaries-common-dev (>= 0.9.1).
----------------------------------------------------------------------
--
=====================================================================
Agustin Martin Domingo, Dpto. de Fisica, ETS Arquitectura Madrid,
(U. Politecnica de Madrid) tel: +34 91-336-6536, Fax: +34 91-336-6554,
email:agmartin@aq.upm.es, http://corbu.aq.upm.es/~agmartin/welcome.html