# HG changeset patch # User Katsumi Yamaoka # Date 1280706572 0 # Node ID d6a756a04dd0be81e9c99b1e20d9bbdc72533903 # Parent 768a90ad492c2d985dc0b6f087316fab492f9a38 Fix last nnmail-get-new-mail-1 change that caused double encoding in XEmacs. 2010-08-01 Katsumi Yamaoka * nnmail.el (nnmail-get-new-mail-1): Revert. * nnml.el (nnml-active-number): Make sure names of newly created groups in nnml-group-alist are encoded. diff -r 768a90ad492c -r d6a756a04dd0 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Sun Aug 01 22:48:29 2010 +0000 +++ b/lisp/gnus/ChangeLog Sun Aug 01 23:49:32 2010 +0000 @@ -1,3 +1,10 @@ +2010-08-01 Katsumi Yamaoka + + * nnmail.el (nnmail-get-new-mail-1): Revert. + + * nnml.el (nnml-active-number): Make sure names of newly created groups + in nnml-group-alist are encoded. + 2010-07-30 Katsumi Yamaoka * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly diff -r 768a90ad492c -r d6a756a04dd0 lisp/gnus/nnmail.el --- a/lisp/gnus/nnmail.el Sun Aug 01 22:48:29 2010 +0000 +++ b/lisp/gnus/nnmail.el Sun Aug 01 23:49:32 2010 +0000 @@ -1844,20 +1844,9 @@ (if (zerop total) (nnheader-message 4 "%s: Reading incoming mail (no new mail)...done" method (car source)) - (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)))) + (nnmail-save-active + (nnmail-get-value "%s-group-alist" method) + (nnmail-get-value "%s-active-file" method)) (when exit-func (funcall exit-func)) (run-hooks 'nnmail-read-incoming-hook) diff -r 768a90ad492c -r d6a756a04dd0 lisp/gnus/nnml.el --- a/lisp/gnus/nnml.el Sun Aug 01 22:48:29 2010 +0000 +++ b/lisp/gnus/nnml.el Sun Aug 01 23:49:32 2010 +0000 @@ -751,10 +751,9 @@ (defun nnml-active-number (group &optional server) "Compute the next article number in GROUP on SERVER." - (let ((active (cadr (assoc (if nnmail-group-names-not-encoded-p - (nnml-encoded-group-name group server) - group) - nnml-group-alist)))) + (let* ((encoded (if nnmail-group-names-not-encoded-p + (nnml-encoded-group-name group server))) + (active (cadr (assoc (or encoded group) nnml-group-alist)))) ;; The group wasn't known to nnml, so we just create an active ;; entry for it. (unless active @@ -772,7 +771,7 @@ (cons (caar nnml-article-file-alist) (caar (last nnml-article-file-alist))) (cons 1 0))) - (push (list group active) nnml-group-alist)) + (push (list (or encoded group) active) nnml-group-alist)) (setcdr active (1+ (cdr active))) (while (file-exists-p (nnml-group-pathname group (int-to-string (cdr active)) server))