changeset 109610:89b599cafa6e

Fix last nnmail-get-new-mail-1 change that caused double encoding in XEmacs. 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.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 01 Aug 2010 23:50:24 +0000
parents fa191ba50511 (current diff) d6a756a04dd0 (diff)
children 85cbdb81d0e0 256d64c7ec3a
files
diffstat 3 files changed, 14 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sun Aug 01 18:07:10 2010 +0000
+++ b/lisp/gnus/ChangeLog	Sun Aug 01 23:50:24 2010 +0000
@@ -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
--- a/lisp/gnus/nnmail.el	Sun Aug 01 18:07:10 2010 +0000
+++ b/lisp/gnus/nnmail.el	Sun Aug 01 23:50:24 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)
--- a/lisp/gnus/nnml.el	Sun Aug 01 18:07:10 2010 +0000
+++ b/lisp/gnus/nnml.el	Sun Aug 01 23:50:24 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))