comparison lisp/gnus/nnmail.el @ 91367:c70e45a7acfd

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
author Miles Bader <miles@gnu.org>
date Wed, 30 Jan 2008 07:57:28 +0000
parents 606f2d163a64 949936fe51a9
children
comparison
equal deleted inserted replaced
91366:86f3a8f0a3a6 91367:c70e45a7acfd
1764 (let ((sym (intern (apply 'format args)))) 1764 (let ((sym (intern (apply 'format args))))
1765 (when (boundp sym) 1765 (when (boundp sym)
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)
1777 incoming incomings source) 1781 incoming incomings source)
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)
1784 group) 1800 group)
1785 (mail-source-bind (directory source) 1801 (mail-source-bind (directory source)
1814 (gnus-byte-compile 1830 (gnus-byte-compile
1815 `(lambda (file orig-file) 1831 `(lambda (file orig-file)
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)))
1825 ;; If we did indeed read any incoming spools, we save all info. 1842 ;; If we did indeed read any incoming spools, we save all info.
1826 (if (zerop total) 1843 (if (zerop total)