Sven Joachim <[EMAIL PROTECTED]> writes:
Hi Sven,
> 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.
At least for newsgroups you could do something like this:
--8<---------------cut here---------------start------------->8---
(defun th-switch-ispell-dictionary ()
(save-excursion
(message-goto-newsgroups)
(let ((newsgroups (buffer-substring-no-properties
(line-beginning-position) (line-end-position))))
(cond ((string-match (rx " de.") newsgroups)
(ispell-change-dictionary "german"))
((string-match (rx " fr.") newsgroups)
(ispell-change-dictionary "french"))
(t
(ispell-change-dictionary "english"))))))
--8<---------------cut here---------------end--------------->8---
I didn't test it, but I wouldn't be too surprised if it works. ;-)
For mail recipients you could probably use a field in the bbdb which
indicates the receivers language, or simply guess by the top-level
domain of the email address.
Bye,
Tassilo
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english