[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About multiple spelling in Emacs
From: |
Colin Baxter |
Subject: |
Re: About multiple spelling in Emacs |
Date: |
Mon, 11 May 2020 12:00:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello Angelo,
>>>>> Angelo Graziosi <address@hidden> writes:
>> Il 10 maggio 2020 alle 18.08 Eli Zaretskii ha scritto:
>>
>>
>> > Date: Sun, 10 May 2020 17:51:50 +0200 (CEST) > From: Angelo
>> Graziosi
>> >
>> > I see that some browser allow for spelling in two languages
>> (say > italian and english). Can we do the same in Emacs? How?
>>
>> You mean, spell-checking text that mixes 2 languages? That's
>> possible with Hunspell, yes.
> But, how? How can I instruct Emacs to use two dictionaries, say
> Italian and English?
I use ispell and switch from English to Latin setting a local variable
ispell-local-dictionary: "latin". If the file, however, has a mixture of
English and Latin then I use a defun:
#+begin_src elisp
(defun my-ispell-latin ()
"Switch to the Latin dictionary."
(interactive)
;; Change personal dict - 1st line personal dict must match language (latin)
(setq ispell-personal-dictionary "~/.emacs-files/dicts/latin.pws")
(ispell-change-dictionary "latin"))
#+end_src
To change back I use another defun for the next language, written in
exactly the same way. Ok, I know, my method is crude, sort of cargo cult
programming, but it works for me.
Best wishes,
Colin.
Colin Baxter
URL: http://www.Colin-Baxter.com