* wl/wl-summary.el (wl-summary-mode): Check with fboundp before calling `make-local...
[elisp/wanderlust.git] / elmo / elmo-vars.el
index 2a6e0ae..5872699 100644 (file)
 
 ;; silence byte compiler
 (eval-when-compile
-  (defun-maybe dynamic-link (a))
-  (defun-maybe dynamic-call (a b)))
+  (defalias-maybe 'dynamic-link 'ignore)
+  (defalias-maybe 'dynamic-call 'ignore))
+
+;; bind colon keywords for old Emacsen.
+(dont-compile
+  (condition-case nil
+      :symbol-for-testing-whether-colon-keyword-is-available-or-not
+    (void-variable
+     (let ((kwds '(:cc :date :extra :message-id :number :references :subject)))
+       (while kwds
+        (set (car kwds) (car kwds))
+        (setq kwds (cdr kwds)))))))
 
 (defgroup elmo nil
   "ELMO, Elisp Library for Message Orchestration."
   :prefix "elmo-"
   :group 'elmo)
 
+(defcustom elmo-digest-flags '(unread)
+  "Flags which are treated as `digest'."
+  :type '(repeat (symbol :tag "flag"))
+  :group 'elmo)
+
+(defcustom elmo-preserved-flags '(forwarded answered cached new unread)
+  "A list to define preserved flags.
+Flags in this list can be searched by `any' flag condition.
+If you want to treat a flag in this list as a `digest' flag,
+you have to add it to `elmo-digest-flags'.
+"
+  :type '(repeat (symbol :tag "flag"))
+  :group 'elmo)
+
 ;; Message Database
 
+(defcustom elmo-msgdb-default-type 'standard
+  "*Default type of Message Database for ELMO."
+  :type '(radio (const legacy)
+               (const standard))
+  :group 'elmo
+  :group 'elmo-setting)
+
+(defcustom elmo-msgdb-convert-type 'auto
+  "*MODB conversion type."
+  :type '(radio (const sync)
+               (const auto)
+               (const :tag "No convert" nil))
+  :group 'elmo
+  :group 'elmo-setting)
+
+(defcustom elmo-init-hook '(elmo-global-mark-migrate)
+  "*A hook called when elmo is initialized."
+  :type 'hook
+  :group 'elmo)
+
 (defvar elmo-msgdb-file-header-chop-length 2048
   "*Number of bytes to get header in one reading from file.")
 
   "A hook called just before the nntp posting.")
 
 ;;; IMAP4
-
-(defcustom elmo-imap4-default-mailbox "inbox"
-  "*Default IMAP4 mailbox."
-  :type 'string
+(defcustom elmo-imap4-set-seen-flag-explicitly
+  nil
+  "*Set Seen flag explicitly (avoid bug in Google Mail)"
+  :type 'boolean
   :group 'elmo
   :group 'elmo-setting)
 
@@ -229,8 +273,6 @@ This is taken precedence over `elmo-network-stream-type-alist'.")
 (defvar elmo-msgdb-lock-list-filename "lock"
   "Locked messages...list of message-id.
 For disconnected operations.")
-(defvar elmo-msgdb-global-mark-filename "global-mark"
-  "Alist of global mark.")
 (defvar elmo-lost+found-folder "+lost+found"
   "Lost and found.")
 (defvar elmo-crosspost-alist-filename "crosspost-alist"
@@ -242,6 +284,13 @@ For disconnected operations.")
 (defvar elmo-strict-diff-folder-list nil
   "List of regexps of folder name which should be checked its diff strictly.")
 
+(defcustom elmo-msgdb-prefer-in-reply-to-for-parent nil
+  "*Non-nil to prefer In-Reply-To header for finding parent message on thread,
+rather than References header."
+  :type 'boolean
+  :group 'elmo
+  :group 'elmo-setting)
+
 (defcustom elmo-msgdb-extra-fields nil
   "Extra fields for msgdb."
   :type '(repeat string)
@@ -314,7 +363,8 @@ If function, return value of function.")
 (defvar elmo-network-stream-type-alist
   '(("!"      ssl       ssl      open-ssl-stream)
     ("!!"     starttls  starttls starttls-open-stream)
-    ("!socks" socks     socks    socks-open-network-stream))
+    ("!socks" socks     socks    socks-open-network-stream)
+    ("!direct" direct   nil   open-network-stream))
   "An alist of (SPEC-STRING SYMBOL FEATURE OPEN-STREAM-FUNCTION).
 SPEC-STRING is a string for stream-type spec (it must start with '!').
 SYMBOL is a symbol which indicates the name of the stream type.
@@ -352,6 +402,12 @@ Arguments for this function are NAME, BUFFER, HOST and SERVICE.")
        (and (eq system-type 'windows-nt) (not (featurep 'meadow)))))
   "Your file system has link count, or not.")
 
+(defvar elmo-use-hardlink
+  ;; Any Emacsen may have add-name-to-file(), because loadup.el
+  ;; requires it. :-p Check make-symbolic-link() instead.
+  (fboundp 'make-symbolic-link)
+  "Hardlink is available on your file system, or not.")
+
 (defvar elmo-weekday-name-en '["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"])
 (defvar elmo-weekday-name-ja '["\e$BF|\e(B" "\e$B7n\e(B" "\e$B2P\e(B" "\e$B?e\e(B" "\e$BLZ\e(B" "\e$B6b\e(B" "\e$BEZ\e(B"])
 (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
@@ -377,24 +433,55 @@ Arguments for this function are NAME, BUFFER, HOST and SERVICE.")
 (defvar elmo-use-decoded-cache (featurep 'xemacs)
   "Use cache of decoded mime charset string.")
 
-(defvar elmo-use-overview-hashtb t
-  "Use hash table of overview.")
-
-(defvar elmo-display-progress-threshold 20
-  "*Displaying progress gauge if number of messages are more than this value.")
-
 (defvar elmo-inhibit-number-mapping nil
   "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
 
-(defvar elmo-display-retrieval-progress-threshold 30000
-  "*Don't display progress if the message size is smaller than this value.")
-
-(defvar elmo-inhibit-display-retrieval-progress nil
-  "Global switch to inhibit display progress of each message's retrieval.")
-
 (defvar elmo-dop-queue nil
   "Global variable for storing disconnected operation queues.")
 
+(defcustom elmo-mime-display-as-is-coding-system (if (boundp 'MULE)
+                                                    '*autoconv* 'undecided)
+  "*Coding system used when message is displayed as is."
+  :type 'symbol
+  :group 'elmo)
+
+(defcustom elmo-mailing-list-name-spec-list
+  '(x-ml-name
+    (x-sequence "^\\([^ ]+\\)")
+    (subject "^\\s(\\(\\S)+\\)[ :][0-9]+\\s)[ \t]*")
+    (list-post "<mailto:\\(.+\\)@")
+    (list-id "<\\([^.]+\\)\\." "^\\([^.]+\\)\\.")
+    (mailing-list ("\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" . 2))
+    (return-path "^<\\([^@>]+\\)-return-[0-9]+-")
+    (delivered-to "^mailing list \\([^@]+\\)@"))
+  "*List of spec to extract mailing list name from field value."
+  :type '(repeat
+         (choice (symbol :tag "Field Name")
+                 (list (symbol :tag "Field Name")
+                       (repeat
+                        :inline symbol
+                        (choice regexp
+                                (cons regexp
+                                      (integer :tag "Match Index")))))))
+  :group 'elmo)
+
+(defcustom elmo-mailing-list-count-spec-list
+  '(x-mail-count
+    x-ml-count
+    (x-sequence "^[^ ]+ \\([^ ]+\\)")
+    (subject "^\\s(\\S)+[ :]\\([0-9]+\\)\\s)[ \t]*")
+    (return-path "^<[^@>]+-return-\\([0-9]+\\)-"))
+  "*List of spec to extract mailing list count from field value."
+  :type '(repeat
+         (choice (symbol :tag "Field Name")
+                 (list (symbol :tag "Field Name")
+                       (repeat
+                        :inline symbol
+                        (choice regexp
+                                (cons regexp
+                                      (integer :tag "Match Index")))))))
+  :group 'elmo)
+
 (require 'product)
 (product-provide (provide 'elmo-vars) (require 'elmo-version))