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: Axel E. Retif
Subject: Re: [AUCTeX] Change spell dictionary per document
Date: Mon, 10 Feb 2014 02:49:13 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi, Tassilo.


On 02/10/2014 02:09 AM, Tassilo Horn wrote:

"Axel E. Retif" writes:

Hi Axel,

In .emacs I have Spanish as predefined dictionary for spell
checking, but for some documents I need English spell checking.

[...]

you could also add this near the end of the file.

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

I always use Local Variables, as I always work with a master document and \include the chapters; so this would be great, but...

I just tried and there is a message when I reopen the files:

    The local variables list in <title.tex>
    contains values that may not be safe (*).

    Do you want to apply it? You can type
    y -- to apply [...]

    [...]

    * ispell-dictionary : "english"

I said «y», but unfortunately, it didn't work ---M-x ispell still tries to use Spanish by default.

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 didn't google it, but saw similar cases in the AUCTeX manual, and tried it just in case it worked.


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.

Can I just download that english.el and put it in .../share/emacs/site-lisp/auctex/style/ along the other <language>.el files?

If so, where can I download it from?


Thank you and best regards

Axel





reply via email to

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