Fix last nnmail-get-new-mail-1 change that caused double encoding in XEmacs.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 1 Aug 2010 23:44:51 +0000 (23:44 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 1 Aug 2010 23:44:51 +0000 (23:44 +0000)
2010-08-01  Katsumi Yamaoka  <yamaoka@jpl.org>
 * 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.

lisp/ChangeLog
lisp/nnmail.el
lisp/nnml.el

index bbf42d3..b7e654b 100644 (file)
@@ -1,3 +1,10 @@
+2010-08-01  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * 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  <yamaoka@jpl.org>
 
        * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly
index 537d98c..8bf0cbf 100644 (file)
@@ -1844,20 +1844,9 @@ 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))
-       (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)
index fb5fb44..238e022 100644 (file)
@@ -751,10 +751,9 @@ article number.  This function is called narrowed to an article."
 
 (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 @@ article number.  This function is called narrowed to an article."
                (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))