diff lisp/gnus/nnml.el @ 109609:d6a756a04dd0

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:49:32 +0000
parents 855f55740303
children 8d09094063d0
line wrap: on
line diff
--- 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))