summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2010-07-30 02:01:04 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-07-30 02:01:04 +0000
commit6f1c4158bee6cd97c2f88b08232bea0304dc4260 (patch)
tree75bc7b720e5e05a35842076a301ef20771e89c95 /lisp/gnus
parent59df9fdd65b4db1968b84ccbbb4d4dc2c1b67db6 (diff)
downloademacs-6f1c4158bee6cd97c2f88b08232bea0304dc4260.tar.gz
Encode names of nnml groups that nnmail-get-new-mail creates in active file.
2010-07-30 Katsumi Yamaoka <yamaoka@jpl.org> * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly containing non-ASCII characters in active file for nnml back end.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/nnmail.el17
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e2af8fcdd16..44c28c52fff 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-30 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly
+ containing non-ASCII characters in active file for nnml back end.
+
2010-07-24 David Engster <dengste@eml.cc>
* mml-smime.el (mml-smime-epg-verify): Also accept the older
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 8bf0cbf5de1..537d98cc6ae 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1844,9 +1844,20 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(if (zerop total)
(nnheader-message 4 "%s: Reading incoming mail (no new mail)...done"
method (car source))
- (nnmail-save-active
- (nnmail-get-value "%s-group-alist" method)
- (nnmail-get-value "%s-active-file" method))
+ (let ((group-alist (nnmail-get-value "%s-group-alist" method))
+ (active-file (nnmail-get-value "%s-active-file" method))
+ encoded)
+ ;; Encode group names possibly containing non-ASCII characters.
+ (cond ((eq method 'nnml)
+ (nnmail-save-active
+ (dolist (elem group-alist (nreverse encoded))
+ (push (cons (nnml-encoded-group-name (car elem)
+ gnus-command-method)
+ (cdr elem))
+ encoded))
+ active-file))
+ (t
+ (nnmail-save-active group-alist active-file))))
(when exit-func
(funcall exit-func))
(run-hooks 'nnmail-read-incoming-hook)