comparison 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
comparison
equal deleted inserted replaced
109608:768a90ad492c 109609:d6a756a04dd0
749 (nnml-add-nov (car ga) (cdr ga) headers)))) 749 (nnml-add-nov (car ga) (cdr ga) headers))))
750 group-art) 750 group-art)
751 751
752 (defun nnml-active-number (group &optional server) 752 (defun nnml-active-number (group &optional server)
753 "Compute the next article number in GROUP on SERVER." 753 "Compute the next article number in GROUP on SERVER."
754 (let ((active (cadr (assoc (if nnmail-group-names-not-encoded-p 754 (let* ((encoded (if nnmail-group-names-not-encoded-p
755 (nnml-encoded-group-name group server) 755 (nnml-encoded-group-name group server)))
756 group) 756 (active (cadr (assoc (or encoded group) nnml-group-alist))))
757 nnml-group-alist))))
758 ;; The group wasn't known to nnml, so we just create an active 757 ;; The group wasn't known to nnml, so we just create an active
759 ;; entry for it. 758 ;; entry for it.
760 (unless active 759 (unless active
761 ;; Perhaps the active file was corrupt? See whether 760 ;; Perhaps the active file was corrupt? See whether
762 ;; there are any articles in this group. 761 ;; there are any articles in this group.
770 (setq active 769 (setq active
771 (if nnml-article-file-alist 770 (if nnml-article-file-alist
772 (cons (caar nnml-article-file-alist) 771 (cons (caar nnml-article-file-alist)
773 (caar (last nnml-article-file-alist))) 772 (caar (last nnml-article-file-alist)))
774 (cons 1 0))) 773 (cons 1 0)))
775 (push (list group active) nnml-group-alist)) 774 (push (list (or encoded group) active) nnml-group-alist))
776 (setcdr active (1+ (cdr active))) 775 (setcdr active (1+ (cdr active)))
777 (while (file-exists-p 776 (while (file-exists-p
778 (nnml-group-pathname group (int-to-string (cdr active)) server)) 777 (nnml-group-pathname group (int-to-string (cdr active)) server))
779 (setcdr active (1+ (cdr active)))) 778 (setcdr active (1+ (cdr active))))
780 (cdr active))) 779 (cdr active)))