summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-08-26 11:23:39 +0200
committerGravatar Tom Willemse2014-08-26 11:23:39 +0200
commitb5ea7e05eaef6bb269955491881fd9eab0d15361 (patch)
treed0762b97d03447d29a10bd0a01bfe5f16fe6af01
parentf719e35fbf23288557c064b86a64f054f4630b4b (diff)
downloaddotfiles-b5ea7e05eaef6bb269955491881fd9eab0d15361.tar.gz
dotfiles-b5ea7e05eaef6bb269955491881fd9eab0d15361.zip
Properly set ispell language when sending mails
-rw-r--r--emacs/.emacs.d/init.org6
-rw-r--r--emacs/.emacs.d/site-lisp/gnus-init.el7
2 files changed, 3 insertions, 10 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 1031ae2..b57ee51 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -425,9 +425,9 @@
(defun oni:switch-ispell-dictionary ()
(save-excursion
(message-narrow-to-headers-or-head)
- (let ((from (message-fetch-field "From")))
- (ispell-change-dictionary
- (if (string-match (rx "@aethon.nl>" eol) from) "nl" "en")))))
+ (when (string-match (rx (and "@" (or "aethon" "picturefix") ".nl>") eol)
+ (message-fetch-field "From"))
+ (ispell-change-dictionary "nl"))))
(add-hook 'message-setup-hook 'oni:switch-ispell-dictionary)
#+END_SRC
diff --git a/emacs/.emacs.d/site-lisp/gnus-init.el b/emacs/.emacs.d/site-lisp/gnus-init.el
index 5d58383..4d989f6 100644
--- a/emacs/.emacs.d/site-lisp/gnus-init.el
+++ b/emacs/.emacs.d/site-lisp/gnus-init.el
@@ -76,13 +76,6 @@
(address "thomas@aethon.nl")
(signature-file "~/documents/work/aethon/signature_20131209.txt")
(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)
(setq message-kill-buffer-on-exit t)