]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/nnmail.el
Display non-ASCII group names better in prompts
[gnu-emacs] / lisp / gnus / nnmail.el
index 681116017bacbc6694e869503e1ab24315934f70..3d4178d1022478d50979bd254d4e1db197f09c25 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnmail.el --- mail support functions for the Gnus mail backends
 
-;; Copyright (C) 1995-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news, mail
@@ -83,7 +83,7 @@ If you'd like, for instance, one mail group for mail from the
 else, you could do something like this:
 
  (setq nnmail-split-methods
-       '((\"mail.4ad\" \"From:.*4ad\")
+       \\='((\"mail.4ad\" \"From:.*4ad\")
         (\"mail.junk\" \"From:.*Lars\\\\|Subject:.*buy\")
         (\"mail.misc\" \"\")))
 
@@ -180,7 +180,7 @@ E.g.:
       (lambda (newsgroup)
        (cond ((string-match \"private\" newsgroup) 31)
              ((string-match \"junk\" newsgroup) 1)
-             ((string-match \"important\" newsgroup) 'never)
+             ((string-match \"important\" newsgroup) \\='never)
              (t 7))))"
   :group 'nnmail-expire
   :type '(choice (const :tag "nnmail-expiry-wait" nil)
@@ -1792,6 +1792,12 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
   "Read new incoming mail."
   (nnmail-get-new-mail-1 method exit-func temp group nil spool-func))
 
+(defun nnmail-get-new-mail-per-group ()
+  "Tell us whether the mail-sources specify that `nnmail-get-new-mail' should
+be called once per group or once for all groups."
+  (or (assq 'group mail-sources)
+      (assq 'directory mail-sources)))
+
 (defun nnmail-get-new-mail-1 (method exit-func temp
                              group in-group spool-func)
   (let* ((sources mail-sources)
@@ -1804,7 +1810,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
               sources)
       (while (setq source (pop sources))
        ;; Use group's parameter
-       (when (eq (car source) 'group)
+       (when (and (eq (car source) 'group)
+                  group)
          (let ((mail-sources
                 (list
                  (gnus-group-find-parameter