aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2008-01-28 03:51:31 +0000
committerMiles Bader2008-01-28 03:51:31 +0000
commita1da1e372a7a671153a226d08e9b7ae4b2225196 (patch)
tree9a4451f88c7ebb8060181925839f520b393cf34a /lisp
parent0975aa2475b2691bcb646d56cb3be39f01843ef2 (diff)
downloademacs-a1da1e372a7a671153a226d08e9b7ae4b2225196.tar.gz
emacs-a1da1e372a7a671153a226d08e9b7ae4b2225196.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1016
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/mail-source.el2
-rw-r--r--lisp/gnus/nnmail.el27
3 files changed, 32 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 35347c8e71a..94a976c8e65 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12008-01-24 Michael Sperber <sperber@deinprogramm.de>
2
3 * mail-source.el (mail-sources): Add `group' choice.
4
5 * nnmail.el (nnmail-get-new-mail-1): Abstract this out to add another
6 parameter `in-group' to control into which group the articles go.
7 Add treatment of `group' mail-source.
8
12008-01-24 Dan Nicolaescu <dann@ics.uci.edu> 92008-01-24 Dan Nicolaescu <dann@ics.uci.edu>
2 10
3 * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at): 11 * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at):
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 9f9f9733110..01463c55628 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -74,6 +74,8 @@ See Info node `(gnus)Mail Source Specifiers'."
74 (repeat :tag "List" 74 (repeat :tag "List"
75 (choice :format "%[Value Menu%] %v" 75 (choice :format "%[Value Menu%] %v"
76 :value (file) 76 :value (file)
77 (cons :tag "Group parameter `mail-source'"
78 (const :format "" group))
77 (cons :tag "Spool file" 79 (cons :tag "Spool file"
78 (const :format "" file) 80 (const :format "" file)
79 (checklist :tag "Options" :greedy t 81 (checklist :tag "Options" :greedy t
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index f0f90218aab..a6ed7190351 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1766,11 +1766,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1766 (symbol-value sym)))) 1766 (symbol-value sym))))
1767 1767
1768(defun nnmail-get-new-mail (method exit-func temp 1768(defun nnmail-get-new-mail (method exit-func temp
1769 &optional group spool-func) 1769 &optional group spool-func)
1770 "Read new incoming mail." 1770 "Read new incoming mail."
1771 (nnmail-get-new-mail-1 method exit-func temp group nil spool-func))
1772
1773(defun nnmail-get-new-mail-1 (method exit-func temp
1774 group in-group spool-func)
1775
1771 (let* ((sources mail-sources) 1776 (let* ((sources mail-sources)
1772 fetching-sources 1777 fetching-sources
1773 (group-in group)
1774 (i 0) 1778 (i 0)
1775 (new 0) 1779 (new 0)
1776 (total 0) 1780 (total 0)
@@ -1778,6 +1782,18 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1778 (when (and (nnmail-get-value "%s-get-new-mail" method) 1782 (when (and (nnmail-get-value "%s-get-new-mail" method)
1779 sources) 1783 sources)
1780 (while (setq source (pop sources)) 1784 (while (setq source (pop sources))
1785
1786 ;; Use group's parameter
1787 (when (eq (car source) 'group)
1788 (let ((mail-sources
1789 (list
1790 (gnus-group-find-parameter
1791 (concat (symbol-name method) ":" group)
1792 'mail-source t))))
1793 (nnmail-get-new-mail-1 method exit-func temp
1794 group group spool-func))
1795 (setq source nil))
1796
1781 ;; Hack to only fetch the contents of a single group's spool file. 1797 ;; Hack to only fetch the contents of a single group's spool file.
1782 (when (and (eq (car source) 'directory) 1798 (when (and (eq (car source) 'directory)
1783 (null nnmail-scan-directory-mail-source-once) 1799 (null nnmail-scan-directory-mail-source-once)
@@ -1816,9 +1832,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1816 (nnmail-split-incoming 1832 (nnmail-split-incoming
1817 file ',(intern (format "%s-save-mail" method)) 1833 file ',(intern (format "%s-save-mail" method))
1818 ',spool-func 1834 ',spool-func
1819 (if (equal file orig-file) 1835 (or in-group
1820 nil 1836 (if (equal file orig-file)
1821 (nnmail-get-split-group orig-file ',source)) 1837 nil
1838 (nnmail-get-split-group orig-file ',source)))
1822 ',(intern (format "%s-active-number" method))))))) 1839 ',(intern (format "%s-active-number" method)))))))
1823 (incf total new) 1840 (incf total new)
1824 (incf i))) 1841 (incf i)))