X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Felmo-vars.el;h=39601f52a97ac46c4d373d44b7c708be127b3379;hb=a717271e46f76079d48f9f976807cfaeeb0a3f85;hp=b2f6fafad4f0f328af9bbc12df8a459920779bb3;hpb=2e9f5d2e3f003da464c20fe9924d1e80849265e6;p=elisp%2Fwanderlust.git diff --git a/elmo/elmo-vars.el b/elmo/elmo-vars.el index b2f6faf..39601f5 100644 --- a/elmo/elmo-vars.el +++ b/elmo/elmo-vars.el @@ -1,6 +1,6 @@ -;;; elmo-vars.el -- User variables for ELMO. +;;; elmo-vars.el --- User variables for ELMO. -;; Copyright 1998,1999,2000 Yuuichi Teranishi +;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news @@ -24,89 +24,194 @@ ;; ;;; Commentary: -;; +;; ;;; Code: -;; +;; (require 'poe) +;; silence byte compiler (eval-when-compile (defun-maybe dynamic-link (a)) (defun-maybe dynamic-call (a b))) -;; Version info. -(defconst elmo-version "1.1.2") -(defconst elmo-appname "ELMO") - -(defun elmo-version () - (format "%s/%s" elmo-appname elmo-version)) - -;; IMAP4 -(defvar elmo-default-imap4-mailbox "inbox" - "*Default IMAP4 mailbox.") -(defvar elmo-default-imap4-server "localhost" - "*Default IMAP4 server.") -(defvar elmo-default-imap4-authenticate-type "auth" - "*Default Authentication type for IMAP4.") ; "auth" or "login" -(defvar elmo-default-imap4-user (or (getenv "USER") - (getenv "LOGNAME") - (user-login-name)) - "*Default username for IMAP4") -(defvar elmo-default-imap4-port 143 - "*Default Port number of IMAP.") -(defvar elmo-default-imap4-ssl nil - "*Non-nil forces using SSL by default.") +;; 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." + :tag "ELMO" + :prefix "elmo-" + :group 'news + :group 'mail) + +(defgroup elmo-setting nil + "ELMO common settings." + :prefix "elmo-" + :group 'elmo) + +;; Message Database + +(defvar elmo-msgdb-file-header-chop-length 2048 + "*Number of bytes to get header in one reading from file.") -;; POP3 -(defvar elmo-default-pop3-user (or (getenv "USER") - (getenv "LOGNAME") - (user-login-name)) - "*Default username for POP3") -(defvar elmo-default-pop3-server "localhost" - "*Default POP3 server.") -(defvar elmo-default-pop3-authenticate-type "user" - "*Default Authentication type for POP3") ; "apop" or "user" -(defvar elmo-default-pop3-port 110 - "*Default POP3 port.") -(defvar elmo-default-pop3-ssl nil - "*Non-nil forces using SSL by default.") - -;; NNTP -(defvar elmo-default-nntp-server "localhost" - "*Default NNTP server.") -(defvar elmo-default-nntp-user nil - "*Default User of NNTP. nil means no user authentication.") -(defvar elmo-default-nntp-port 119 - "*Default Port number of NNTP") -(defvar elmo-default-nntp-ssl nil - "*Non-nil forces using SSL by default.") - -(defvar elmo-localdir-folder-path "~/Mail" - "*Local mail folder path.") -(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).") -(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.") +(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.") + (defvar elmo-msg-appended-hook nil "A hook called when message is appended to database.") (defvar elmo-msg-deleted-hook nil - "A hook called when message is deleted from database") + "A hook called when message is deleted from database.") (defvar elmo-nntp-post-pre-hook nil "A hook called just before the nntp posting.") -(defvar elmo-lang "ja" - "Language for displayed messages.") + +;;; IMAP4 + +(defcustom elmo-imap4-default-server "localhost" + "*Default IMAP4 server." + :type 'string + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-imap4-default-authenticate-type 'login + "*Default Authentication type for IMAP4." + :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") + (getenv "LOGNAME") + (user-login-name)) + "*Default username for IMAP4." + :type 'string + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-imap4-default-port 143 + "*Default Port number of IMAP." + :type 'integer + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-imap4-default-stream-type nil + "*Default stream type for IMAP4. +Any symbol value of `elmo-network-stream-type-alist' or +`elmo-imap4-stream-type-alist'." + :type 'symbol + :group 'elmo) + +(defvar elmo-imap4-stream-type-alist nil + "*Stream bindings for IMAP4. +This is taken precedence over `elmo-network-stream-type-alist'.") + +;;; NNTP + +;; User options +(defcustom elmo-nntp-default-server "localhost" + "*Default NNTP server." + :type 'string + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-nntp-default-user nil + "*Default User of NNTP. nil means no user authentication." + :type '(choice (const nil) + string) + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-nntp-default-port 119 + "*Default Port number of NNTP." + :type 'integer + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-nntp-default-stream-type nil + "*Default stream type for NNTP. +Any symbol value of `elmo-network-stream-type-alist' or +`elmo-nntp-stream-type-alist'." + :type 'symbol + :group 'elmo) + +(defvar elmo-nntp-stream-type-alist nil + "*Stream bindings for NNTP. +This is taken precedence over `elmo-network-stream-type-alist'.") + +;;; POP3 + +;; POP3 +(defcustom elmo-pop3-default-user (or (getenv "USER") + (getenv "LOGNAME") + (user-login-name)) + "*Default username for POP3." + :type 'string + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-pop3-default-server "localhost" + "*Default POP3 server." + :type 'string + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-pop3-default-authenticate-type 'user + "*Default Authentication type for POP3." + :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 + "*Default POP3 port." + :type 'integer + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-pop3-default-stream-type nil + "*Default stream type for POP3. +Any symbol value of `elmo-network-stream-type-alist' or +`elmo-pop3-stream-type-alist'." + :type 'symbol + :group 'elmo) + +(defvar elmo-pop3-stream-type-alist nil + "*Stream bindings for POP3. +This is taken precedence over `elmo-network-stream-type-alist'.") + +(defcustom elmo-lang "ja" + "Language for displayed messages." + :type 'string + :group 'elmo-setting) (defvar elmo-mime-charset 'iso-2022-jp) -(defvar elmo-search-mime-charset 'iso-2022-jp) (defvar elmo-msgdb-mark-filename "mark" "Mark database.") @@ -125,16 +230,11 @@ Each elements are regexp of folder name (This is obsolete).") "Folder list cache (for access folder).") (defvar elmo-msgdb-finfo-filename "finfo" "Folder information cache...list of '(filename . '(new unread all)).") -(defvar elmo-msgdb-append-list-filename "append" - "Appended messages...Structure is same as number-alist. -For disconnected operations.") -(defvar elmo-msgdb-resume-list-filename "resume" - "Resumed messages. For disconnected operations.") (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 .") + "Alist of global mark.") (defvar elmo-lost+found-folder "+lost+found" "Lost and found.") (defvar elmo-crosspost-alist-filename "crosspost-alist" @@ -143,40 +243,27 @@ For disconnected operations.") (defvar elmo-use-server-diff t "Non-nil forces to get unread message information on server.") -(defvar elmo-imap4-disuse-server-flag-mailbox-regexp "^#mh" ; UW imapd - "If mailbox name matches this value, flags on server are not used except - \Delete flag.") +(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-extra-fields nil + "Extra fields for msgdb." + :type '(repeat string) + :group 'elmo + :group 'elmo-setting) -(defvar elmo-queue-filename "queue" - "*IMAP pending event queue is saved in this file.") -(defvar elmo-enable-disconnected-operation nil - "*Enable disconnected operations.") - -(defvar elmo-imap4-overview-fetch-chop-length 200 - "*Number of overviews to fetch in one request in imap4.") -(defvar elmo-nntp-overview-fetch-chop-length 200 - "*Number of overviews to fetch in one request in nntp.") -(defvar elmo-localdir-header-chop-length 2048 - "*Number of bytes to get header in one reading from file.") -(defvar elmo-imap4-force-login nil - "*Non-nil forces to try 'login' if there is no 'auth' capability in imapd.") -(defvar elmo-imap4-use-select-to-update-status nil - "*Some imapd have to send select command to update status. -(ex. UW imapd 4.5-BETA?). For these imapd, you must set this variable t.") - -(defvar elmo-imap4-use-modified-utf7 nil - "*Use mofidied UTF-7 (rfc2060) encoding for IMAP4 folder name.") +(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. Don't change plugged state automatically if nil.") - + "*Time to expire change plugged state automatically, as the number of seconds. +Don't change plugged state automatically if nil.") (defvar elmo-plugged-condition 'one "*The condition for `elmo-plugged' becomes on. -If `all', when all port is on. If `one', when even one port is on. +If `all', when all ports are on. If `one', when even one port is on. If `independent', independent port plugged. If function, return value of function.") @@ -196,19 +283,12 @@ If function, return value of function.") (defvar elmo-path-sep "/" "*Path separator.") (defvar elmo-plugged t) -(defvar elmo-use-semi nil) + (defvar elmo-no-subject "(No Subject in original.)" "*A string used when no subject field exists.") (defvar elmo-no-from "nobody@nowhere?" "*A string used when no from field exists.") -(defvar elmo-multi-divide-number 100000 - "*Multi divider number.") - -;;; User variables for elmo-archive. -(defvar elmo-archive-default-type 'zip - "*Default archiver type. The value must be a symbol.") - ;; database dynamic linking (defvar elmo-database-dl-module (expand-file-name "database.so" exec-directory)) @@ -232,24 +312,20 @@ If function, return value of function.") ;; static/dl-database (fboundp 'open-database))) -(defvar elmo-date-match (not (boundp 'nemacs-version)) - "Date match is available or not") - -(defconst elmo-spec-alist - '((?% . imap4) - (?- . nntp) - (?\+ . localdir) - (?\* . multi) - (?\/ . filter) - (?\$ . archive) - (?& . pop3) - (?= . localnews) - (?' . internal) - (?| . pipe) - (?. . maildir))) - -(defvar elmo-debug nil) -(defconst mmelmo-entity-buffer-name "*MMELMO-BUFFER*") +(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)) + "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. +SYMBOL should be identical in this alist. +FEATURE is a symbol of the feature for OPEN-STREAM-FUNCTION. +OPEN-STREAM-FUNCTION is a function to open network stream. +Arguments for this function are NAME, BUFFER, HOST and SERVICE.") (defvar elmo-folder-info-hashtb nil "Array of folder database information '(max length new unread).") @@ -261,18 +337,13 @@ If function, return value of function.") "Default expiration method.") (defvar elmo-cache-expire-default-size 30000 - "Cache expiration disk size (Kilo bytes). This must be float value.") + "Cache expiration disk size (Kilo bytes). This must be float value.") (defvar elmo-cache-expire-default-age 50 "Cache expiration age (days).") -(defvar elmo-cache-dirname "cache" - "Directory name for cache storage.") - -(defvar elmo-use-buffer-cache t - "Use buffer cache.") -(defvar elmo-buffer-cache-size 10 - "*Number of buffer for message cache.") +(defvar elmo-cache-directory (expand-file-name "cache" elmo-msgdb-directory) + "Directory name for cache storage.") (defvar elmo-pack-number-check-strict t "Pack number strictly.") @@ -290,7 +361,7 @@ If function, return value of function.") (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"]) (defvar elmo-weekday-name-de '["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"]) -(defvar elmo-msgid-replace-string-alist +(defvar elmo-filename-replace-string-alist '((":" . " c") ("*" . " a") ("?" . " q") @@ -301,29 +372,31 @@ If function, return value of function.") ("/" . " s") ("\\" . " b"))) -(defvar elmo-archive-use-cache nil - "Use cache in archive folder.") +(defvar elmo-hash-minimum-size 1023 + "Minimum size of hash table.") + +(defvar elmo-hash-maximum-size 4095 + "Maximum size of hash table.") -(defvar elmo-nntp-use-cache t - "Use cache in nntp folder.") +(defvar elmo-use-decoded-cache (featurep 'xemacs) + "Use cache of decoded mime charset string.") -(defvar elmo-imap4-use-cache t - "Use cache in imap4 folder.") +(defvar elmo-display-progress-threshold 20 + "*Displaying progress gauge if number of messages are more than this value.") -(defvar elmo-pop3-use-cache t - "Use cache in pop3 folder.") +(defvar elmo-inhibit-number-mapping nil + "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).") -(defvar elmo-localdir-lockfile-list nil) +(defvar elmo-display-retrieval-progress-threshold 30000 + "*Don't display progress if the message size is smaller than this value.") -(defvar elmo-nntp-max-number-precedes-list-active nil - "If non-nil, max number of the msgdb is set as the max number of -'list active' (needed for inn 2.3 or later?). ") +(defvar elmo-inhibit-display-retrieval-progress nil + "Global switch to inhibit display progress of each message's retrieval.") -(defvar elmo-pop3-send-command-synchronously nil - "If non-nil, commands are send synchronously. -If server doesn't accept asynchronous commands, this variable should be -set as non-nil.") +(defvar elmo-dop-queue nil + "Global variable for storing disconnected operation queues.") -(provide 'elmo-vars) +(require 'product) +(product-provide (provide 'elmo-vars) (require 'elmo-version)) ;;; elmo-vars.el ends here