-;;; elmo-vars.el -- User variables for ELMO.
+;;; elmo-vars.el --- User variables for ELMO.
;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
;;
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'poe)
;; 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)
-;; Local
-(defvar elmo-localnews-folder-path "~/News"
- "*Local news folder path.")
-(defvar elmo-maildir-folder-path "~/Maildir"
- "*Maildir folder path.")
-(defvar elmo-maildir-list '("\\+~/Maildir")
- "*All Folders that match this list will be treated as Maildir.
-Each elements are regexp of folder name (This is obsolete).")
+(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.")
-(defvar elmo-msgdb-dir "~/.elmo"
- "*ELMO Message Database path.")
+(defcustom elmo-msgdb-directory "~/.elmo"
+ "*ELMO Message Database path."
+ :type 'directory
+ :group 'elmo
+ :group 'elmo-setting)
(defvar elmo-passwd-alist-file-name "passwd"
"*ELMO Password filename.")
-(defvar elmo-passwd-life-time nil
- "*Duration of ELMO Password in seconds. nil means infinity.")
+(defcustom elmo-passwd-life-time nil
+ "*Duration of ELMO Password in seconds. nil means infinity."
+ :type '(choice (const :tag "Infinity" nil)
+ number)
+ :group 'elmo
+ :group 'elmo-setting)
(defvar elmo-warning-threshold 30000
"*Display warning when the bytes of message exceeds this value.")
;;; IMAP4
-(defcustom elmo-imap4-default-mailbox "inbox"
- "*Default IMAP4 mailbox."
- :type 'string
- :group 'elmo
- :group 'elmo-setting)
-
(defcustom elmo-imap4-default-server "localhost"
"*Default IMAP4 server."
:type 'string
(defcustom elmo-imap4-default-authenticate-type 'login
"*Default Authentication type for IMAP4."
- :type 'symbol
+ :type '(radio (const :tag "encoded password transmission (login)" login)
+ (const :tag "CRAM-MD5 authentication (cram-md5)" cram-md5)
+ (const :tag "DIGEST-MD5 authentication (digest-md5)" digest-md5)
+ (const :tag "plain password transmission (clear)" clear)
+ (const :tag "NTLM authentication (ntlm)" ntlm)
+ (function :tag "Other"))
:group 'elmo)
(defcustom elmo-imap4-default-user (or (getenv "USER")
(defcustom elmo-nntp-default-user nil
"*Default User of NNTP. nil means no user authentication."
- :type 'string
+ :type '(choice (const nil)
+ string)
:group 'elmo
:group 'elmo-setting)
(defcustom elmo-pop3-default-authenticate-type 'user
"*Default Authentication type for POP3."
- :type 'symbol
+ :type '(radio (const :tag "plain password transmission (user)" user)
+ (const :tag "APOP authentication (apop)" apop)
+ (const :tag "CRAM-MD5 authentication (cram-md5)" cram-md5)
+ (const :tag "DIGEST-MD5 authentication (digest-md5)" digest-md5)
+ (const :tag "NTLM authentication (ntlm)" ntlm)
+ (function :tag "Other"))
:group 'elmo)
(defcustom elmo-pop3-default-port 110
(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"
(defvar elmo-strict-diff-folder-list nil
"List of regexps of folder name which should be checked its diff strictly.")
-(defvar elmo-msgdb-extra-fields nil
- "Extra fields for msgdb.")
+(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)
-(defvar elmo-enable-disconnected-operation t
- "*Enable disconnected operations.")
+(defcustom elmo-msgdb-extra-fields nil
+ "Extra fields for msgdb."
+ :type '(repeat string)
+ :group 'elmo
+ :group 'elmo-setting)
+
+(defcustom elmo-enable-disconnected-operation t
+ "*Non-nil enables disconnected operations."
+ :type 'boolean
+ :group 'elmo
+ :group 'elmo-setting)
(defvar elmo-auto-change-plugged 600
"*Time to expire change plugged state automatically, as the number of seconds.
;; static/dl-database
(fboundp 'open-database)))
-(defvar elmo-date-match (not (boundp 'nemacs-version))
+(defvar elmo-date-match t
"Date match is available or not.")
(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.
(defvar elmo-cache-expire-default-age 50
"Cache expiration age (days).")
-(defvar elmo-cache-dirname "cache"
+(defvar elmo-cache-directory (expand-file-name "cache" elmo-msgdb-directory)
"Directory name for cache storage.")
(defvar elmo-pack-number-check-strict t
(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"])
(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))