使用我的自定义版本的 th-message-switch-ispell-dictionary 时(请参阅http://lists.gnu.org/archive/html/info-gnus-english/2007-08/msg00062.html):
(defun my-message-switch-ispell-dictionary ()
(save-excursion
(message-narrow-to-headers-or-head)
(let ((newsgroups (message-fetch-field "Newsgroups"))
(to (message-fetch-field "To")))
(message "Newsgroup or To = %s." (or newsgroups to))
(if newsgroups
(cond ((string-match (rx bol "fr.") newsgroups)
(ispell-change-dictionary "francais"))
(t
(ispell-change-dictionary "american")))
;; email
(ispell-change-dictionary "francais")))))
(add-hook 'message-setup-hook 'my-message-switch-ispell-dictionary)
我遇到错误:
message-position-on-field: Search failed: "^--text follows this line--$"
创建邮件或帖子时(并且不再存在“--text follow this line--”)...
知道那里出了什么问题吗?