auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Change spell dictionary per document


From: Tassilo Horn
Subject: Re: [AUCTeX] Change spell dictionary per document
Date: Mon, 10 Feb 2014 09:09:23 +0100
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux)

"Axel E. Retif" <address@hidden> writes:

Hi Axel,

> In .emacs I have Spanish as predefined dictionary for spell checking,
> but for some documents I need English spell checking.
>
> I can change dictionaries when I open a document, but is there a way
> to specify a dictionary *in* the document?
>
> I can't use
>
>     -*- ispell-dictionary: "english" -*-
>
> because when the authors open the documents with their editors, those
> editors for sure will not understand said line.

They won't, but why is that problematic?  They editors will just ignore
it (as you add that as a comment line).  Or are you afraid that they
will delete it since it doesn't make sense to them?

If the first line is too prominent, you could also add this near the end
of the file.

%% Local Variables:
%% ispell-dictionary: "english"
%% End:

> I tried with
>
>     (add-hook 'TeX-language-en-hook
>     (lambda () (ispell-change-dictionary "english")))
>
> in my .emacs, as I have \usepackage[english]{babel} in the preamble,
> but it didn't work.

Yes, until now there was no english style that would run a
TeX-language-en-hook (but at least the docs never spoke of such a hook,
still googling it gives tons of matches).  I guess that's because we
assumed that there's no need, since EN is the default anyway.  Of
course, that's not true in your situation, so now I've added an
english.el that will run TeX-language-en-hook, so the above works now
with the development version of auctex.

Bye,
Tassilo




reply via email to

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