Index: lisp/mail-source.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v retrieving revision 7.24 diff -u -r7.24 mail-source.el --- lisp/mail-source.el 16 Dec 2007 04:23:18 -0000 7.24 +++ lisp/mail-source.el 1 Jan 2008 17:12:10 -0000 @@ -74,6 +74,8 @@ (repeat :tag "List" (choice :format "%[Value Menu%] %v" :value (file) + (cons :tag "Group parameter `mail-source'" + (const :format "" group)) (cons :tag "Spool file" (const :format "" file) (checklist :tag "Options" :greedy t Index: lisp/nnmail.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v retrieving revision 7.38 diff -u -r7.38 nnmail.el --- lisp/nnmail.el 16 Dec 2007 04:23:18 -0000 7.38 +++ lisp/nnmail.el 1 Jan 2008 17:12:11 -0000 @@ -1766,11 +1766,15 @@ (symbol-value sym)))) (defun nnmail-get-new-mail (method exit-func temp - &optional group spool-func) + &optional group spool-func) "Read new incoming mail." + (nnmail-get-new-mail-1 method exit-func temp group nil spool-func)) + +(defun nnmail-get-new-mail-1 (method exit-func temp + group in-group spool-func) + (let* ((sources mail-sources) fetching-sources - (group-in group) (i 0) (new 0) (total 0) @@ -1778,6 +1782,16 @@ (when (and (nnmail-get-value "%s-get-new-mail" method) sources) (while (setq source (pop sources)) + + ;; Use group's parameter + (when (eq (car source) 'group) + (let ((mail-sources + (list + (gnus-group-find-parameter (concat (symbol-name method) ":" group) + 'mail-source t)))) + (nnmail-get-new-mail-1 method exit-func temp group group spool-func)) + (setq source nil)) + ;; Hack to only fetch the contents of a single group's spool file. (when (and (eq (car source) 'directory) (null nnmail-scan-directory-mail-source-once) @@ -1816,9 +1830,10 @@ (nnmail-split-incoming file ',(intern (format "%s-save-mail" method)) ',spool-func - (if (equal file orig-file) - nil - (nnmail-get-split-group orig-file ',source)) + (or in-group + (if (equal file orig-file) + nil + (nnmail-get-split-group orig-file ',source))) ',(intern (format "%s-active-number" method))))))) (incf total new) (incf i))) Index: texi/gnus.texi =================================================================== RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v retrieving revision 7.267 diff -u -r7.267 gnus.texi --- texi/gnus.texi 28 Dec 2007 22:28:04 -0000 7.267 +++ texi/gnus.texi 1 Jan 2008 17:12:16 -0000 @@ -3035,6 +3035,12 @@ If it is set, the value is used as the method for posting message instead of @code{gnus-post-method}. +@item mail-source +@cindex mail-source +If it is set, and the setting of @code{mail-sources} includes a +@code{group} mail source (@pxref{Mail Sources}), the value specifies the +mail source for this group. + @item banner @cindex banner An item like @code{(banner . @var{regexp})} causes any part of an article @@ -14546,6 +14552,11 @@ :user "user-name" :password "secret") @end lisp + +@item group +Get the actual mail source from the @code{mail-source} group parameter, +@xref{Group Parameters}. + @end table @table @dfn