Synch with Gnus.
authoryamaoka <yamaoka>
Thu, 26 Oct 2000 22:32:47 +0000 (22:32 +0000)
committeryamaoka <yamaoka>
Thu, 26 Oct 2000 22:32:47 +0000 (22:32 +0000)
lisp/ChangeLog
lisp/flow-fill.el
lisp/mail-source.el

index fea6a23..2a884ae 100644 (file)
@@ -1,3 +1,20 @@
+2000-10-26  Simon Josefsson  <sj@extundo.com>
+
+       * mail-source.el (mail-sources): IMAP predicate is a string.
+       (mail-sources): Add default values for IMAP mailbox, predicate and
+       fetchflag.
+
+2000-10-26  Dave Love  <fx@gnu.org>
+
+       * flow-fill.el: Require cl when compiling.
+
+       * mail-source.el: Require imap when compiling and defvar
+       display-time-mail-function.  Require mm-util.
+       (nnheader-cancel-timer): Autoload.
+       (mail-source-imap-authenticators, mail-source-imap-streams): New
+       variables.
+       (mail-sources): Use them.
+
 2000-10-25 20:13:02  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-decode.el (mm-viewer-completion-map): New.
index 4abbdc6..80e122a 100644 (file)
@@ -45,6 +45,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (eval-and-compile
   (defalias 'fill-flowed-point-at-bol
        (if (fboundp 'point-at-bol)
index 64a9af8..816177b 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
-(require 'nnheader)
+(eval-when-compile
+  (require 'cl)
+  (require 'imap)
+  (eval-when-compile (defvar display-time-mail-function)))
 (eval-and-compile
   (defvar pop3-leave-mail-on-server)
   (autoload 'pop3-movemail "pop3")
-  (autoload 'pop3-get-message-count "pop3"))
+  (autoload 'pop3-get-message-count "pop3")
+  (autoload 'nnheader-cancel-timer "nnheader"))
 (require 'format-spec)
 
 (defgroup mail-source nil
   "The mail-fetching library."
   :group 'gnus)
 
+;; Define these at compile time to avoid dragging in imap always.
+(defconst mail-source-imap-authenticators
+  (eval-when-compile
+    (mapcar (lambda (a)
+             (list 'const (car a)))
+     imap-authenticator-alist)))
+(defconst mail-source-imap-streams
+  (eval-when-compile
+    (mapcar (lambda (a)
+             (list 'const (car a)))
+     imap-stream-alist)))
+
 (defcustom mail-sources nil
   "*Where the mail backends will look for incoming mail.
 This variable is a list of mail source specifiers.
@@ -142,33 +157,25 @@ See Info node `(gnus)Mail Source Specifiers'."
                                          (const :format "" :value :stream)
                                          (choice :tag "Stream"
                                                  :value network
-                                                 ,@(progn (require 'imap)
-                                                          (mapcar
-                                                           (lambda (a)
-                                                             (list 'const
-                                                                   (car a)))
-                                                           imap-stream-alist
-                                                           ))))
+                                                 ,@mail-source-imap-streams))
                                   (group :inline t
                                          (const :format ""
                                                 :value :authenticator)
                                          (choice :tag "Authenticator"
                                                  :value login
-                                                 ,@(progn (require 'imap)
-                                                          (mapcar
-                                                           (lambda (a)
-                                                             (list 'const
-                                                                   (car a)))
-                                                           imap-authenticator-alist))))
+                                                 ,@mail-source-imap-authenticators))
                                   (group :inline t
                                          (const :format "" :value :mailbox)
-                                         (string :tag "Mailbox"))
+                                         (string :tag "Mailbox"
+                                                 :value "INBOX"))
                                   (group :inline t
                                          (const :format "" :value :predicate)
-                                         (function :tag "Predicate"))
+                                         (string :tag "Predicate" 
+                                                 :value "UNSEEN UNDELETED"))
                                   (group :inline t
                                          (const :format "" :value :fetchflag)
-                                         (string :tag "Fetchflag"))
+                                         (string :tag "Fetchflag"
+                                                 :value  "\\Deleted"))
                                   (group :inline t
                                          (const :format ""
                                                 :value :dontexpunge)