comparison lisp/gnus/nnfolder.el @ 104:cf808b4c4290 r20-1b4

Import from CVS: tag r20-1b4
author cvs
date Mon, 13 Aug 2007 09:16:51 +0200
parents 0d2f883870bc
children 360340f9fd5f
comparison
equal deleted inserted replaced
103:30eda07fe280 104:cf808b4c4290
599 (nnfolder-possibly-change-group group)) 599 (nnfolder-possibly-change-group group))
600 ;; If the group alist isn't active, activate it now. 600 ;; If the group alist isn't active, activate it now.
601 (nnmail-activate 'nnfolder))) 601 (nnmail-activate 'nnfolder)))
602 602
603 (defun nnfolder-active-number (group) 603 (defun nnfolder-active-number (group)
604 (when group 604 ;; Find the next article number in GROUP.
605 (save-excursion 605 (let ((active (cadr (assoc group nnfolder-group-alist))))
606 ;; Find the next article number in GROUP. 606 (if active
607 (prog1 607 (setcdr active (1+ (cdr active)))
608 (let ((active (cadr (assoc group nnfolder-group-alist)))) 608 ;; This group is new, so we create a new entry for it.
609 (if active 609 ;; This might be a bit naughty... creating groups on the drop of
610 (setcdr active (1+ (cdr active))) 610 ;; a hat, but I don't know...
611 ;; This group is new, so we create a new entry for it. 611 (push (list group (setq active (cons 1 1)))
612 ;; This might be a bit naughty... creating groups on the drop of 612 nnfolder-group-alist))
613 ;; a hat, but I don't know... 613 (cdr active)))
614 (push (list group (setq active (cons 1 1)))
615 nnfolder-group-alist))
616 (cdr active))
617 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
618 (nnfolder-possibly-activate-groups group)))))
619 614
620 615
621 ;; This method has a problem if you've accidentally let the active list get 616 ;; This method has a problem if you've accidentally let the active list get
622 ;; out of sync with the files. This could happen, say, if you've 617 ;; out of sync with the files. This could happen, say, if you've
623 ;; accidentally gotten new mail with something other than Gnus (but why 618 ;; accidentally gotten new mail with something other than Gnus (but why