info-gnus-english
[Top][All Lists]
Advanced

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

Changing ispell dictionary


From: Sven Joachim
Subject: Changing ispell dictionary
Date: Fri, 10 Aug 2007 16:51:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Hi,

I am looking for an efficient way to change the ispell dictionary based
on the newsgroup or mail recipients I'm posting/mailing to.  The
Manual says in section 5.4, "Mail and Post":

,----
|    If you want to change the `ispell' dictionary based on what group
| you're in, you could say something like the following:
| 
|      (add-hook 'gnus-select-group-hook
|                (lambda ()
|                  (cond
|                   ((string-match
|                     "^de\\." (gnus-group-real-name gnus-newsgroup-name))
|                    (ispell-change-dictionary "deutsch"))
|                   (t
|                    (ispell-change-dictionary "english")))))
`----

This does not work, unfortunately.  It will only change the dictionary
_local_ in the summary buffer, but not in the buffer for the message I
am going to compose.  Right now I work around this by using
(ispell-change-dictionary "deutsch" 1) to change the global
dictionary instead, but I find this suboptimal.

Does somebody have a bright idea how to automatically change the local
dictionary in the message buffer (assuming that a newsgroup or mail
recipient is known; of course it cannot be guessed if I just type
C-x m outside of Gnus)?  There are various *message-*hook variables
and I don't know which to choose.

Cheers,
       Sven


reply via email to

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