From b5ea7e05eaef6bb269955491881fd9eab0d15361 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 26 Aug 2014 11:23:39 +0200 Subject: Properly set ispell language when sending mails --- emacs/.emacs.d/init.org | 6 +++--- emacs/.emacs.d/site-lisp/gnus-init.el | 7 ------- 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) -- cgit v1.2.3-54-g00ecf