X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Felmo-vars.el;h=3d98591420834c0b01977d08e74c298109fbced8;hb=5cf2b467d42522d5a3da47db8d9851f521ba8c10;hp=cb4d6668ea42864c608e0806894c238c813000ca;hpb=8b003dd16e3d4a1f0d29b5fcd0f57a2ee294f967;p=elisp%2Fwanderlust.git diff --git a/elmo/elmo-vars.el b/elmo/elmo-vars.el index cb4d666..3d98591 100644 --- a/elmo/elmo-vars.el +++ b/elmo/elmo-vars.el @@ -1,4 +1,4 @@ -;;; elmo-vars.el -- User variables for ELMO. +;;; elmo-vars.el --- User variables for ELMO. ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi @@ -24,10 +24,10 @@ ;; ;;; Commentary: -;; +;; ;;; Code: -;; +;; (require 'poe) ;; silence byte compiler @@ -35,30 +35,62 @@ (defun-maybe dynamic-link (a)) (defun-maybe dynamic-call (a b))) +;; 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) -;; 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).") +(defgroup elmo-setting nil + "ELMO common settings." + :prefix "elmo-" + :group 'elmo) + +;; Message Database + +(defcustom elmo-msgdb-default-type 'legacy + "*Default type of Message Database for ELMO." + :type '(radio (const legacy) + (const standard) + (const :tag "No use" generic)) + :group 'elmo + :group 'elmo-setting) + +(defcustom elmo-msgdb-convert-type nil + "*MODB conversion type." + :type '(radio (const sync) + (const auto) + (const :tag "No convert" nil)) + :group 'elmo + :group 'elmo-setting) (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.") @@ -69,8 +101,131 @@ Each elements are regexp of folder name (This is obsolete).") "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) @@ -94,8 +249,6 @@ Each elements are regexp of folder name (This is obsolete).") (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" @@ -107,11 +260,17 @@ For disconnected operations.") (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-enable-disconnected-operation t - "*Enable disconnected operations.") +(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. @@ -138,7 +297,6 @@ 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.") @@ -168,7 +326,7 @@ If function, return value of function.") ;; 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 @@ -198,7 +356,7 @@ Arguments for this function are NAME, BUFFER, HOST and SERVICE.") (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 @@ -237,9 +395,6 @@ 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.")