Properly set ispell language when sending mails
This commit is contained in:
parent
f719e35fbf
commit
b5ea7e05ea
2 changed files with 3 additions and 10 deletions
|
@ -425,9 +425,9 @@
|
||||||
(defun oni:switch-ispell-dictionary ()
|
(defun oni:switch-ispell-dictionary ()
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(message-narrow-to-headers-or-head)
|
(message-narrow-to-headers-or-head)
|
||||||
(let ((from (message-fetch-field "From")))
|
(when (string-match (rx (and "@" (or "aethon" "picturefix") ".nl>") eol)
|
||||||
(ispell-change-dictionary
|
(message-fetch-field "From"))
|
||||||
(if (string-match (rx "@aethon.nl>" eol) from) "nl" "en")))))
|
(ispell-change-dictionary "nl"))))
|
||||||
|
|
||||||
(add-hook 'message-setup-hook 'oni:switch-ispell-dictionary)
|
(add-hook 'message-setup-hook 'oni:switch-ispell-dictionary)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
|
@ -76,13 +76,6 @@
|
||||||
(address "thomas@aethon.nl")
|
(address "thomas@aethon.nl")
|
||||||
(signature-file "~/documents/work/aethon/signature_20131209.txt")
|
(signature-file "~/documents/work/aethon/signature_20131209.txt")
|
||||||
(eval (setq message-sendmail-extra-arguments '("-a" "aethon"))))))
|
(eval (setq message-sendmail-extra-arguments '("-a" "aethon"))))))
|
||||||
(add-hook 'gnus-select-group-hook
|
|
||||||
(lambda ()
|
|
||||||
(cond
|
|
||||||
((string-match (rx (or "aethon" "picturefix"))
|
|
||||||
(gnus-group-real-name gnus-newsgroup-name))
|
|
||||||
(ispell-change-dictionary "nl"))
|
|
||||||
(t (ispell-change-dictionary "en")))))
|
|
||||||
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
||||||
|
|
||||||
(setq message-kill-buffer-on-exit t)
|
(setq message-kill-buffer-on-exit t)
|
||||||
|
|
Loading…
Reference in a new issue