1 ;;; elmo-vars.el -- User variables for ELMO.
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
33 ;; silence byte compiler
35 (defun-maybe dynamic-link (a))
36 (defun-maybe dynamic-call (a b)))
39 "ELMO, Elisp Library for Message Orchestration."
45 (defvar elmo-localnews-folder-path "~/News"
46 "*Local news folder path.")
47 (defvar elmo-maildir-folder-path "~/Maildir"
48 "*Maildir folder path.")
49 (defvar elmo-maildir-list '("\\+~/Maildir")
50 "*All Folders that match this list will be treated as Maildir.
51 Each elements are regexp of folder name (This is obsolete).")
53 (defvar elmo-msgdb-file-header-chop-length 2048
54 "*Number of bytes to get header in one reading from file.")
56 (defvar elmo-msgdb-dir "~/.elmo"
57 "*ELMO Message Database path.")
58 (defvar elmo-passwd-alist-file-name "passwd"
59 "*ELMO Password filename.")
60 (defvar elmo-passwd-life-time nil
61 "*Duration of ELMO Password in seconds. nil means infinity.")
63 (defvar elmo-warning-threshold 30000
64 "*Display warning when the bytes of message exceeds this value.")
66 (defvar elmo-msg-appended-hook nil
67 "A hook called when message is appended to database.")
68 (defvar elmo-msg-deleted-hook nil
69 "A hook called when message is deleted from database.")
70 (defvar elmo-nntp-post-pre-hook nil
71 "A hook called just before the nntp posting.")
72 (defvar elmo-lang "ja"
73 "Language for displayed messages.")
75 (defvar elmo-mime-charset 'iso-2022-jp)
77 (defvar elmo-msgdb-mark-filename "mark"
79 (defvar elmo-msgdb-overview-filename "overview"
81 (defvar elmo-msgdb-number-filename "number"
82 "Message number <=> Message-ID database.")
83 (defvar elmo-msgdb-location-filename "location"
84 "Message number <=> Actual location symbol.")
85 (defvar elmo-msgdb-seen-filename "seen"
86 "Seen message list for append.")
87 (defvar elmo-msgdb-killed-filename "killed"
88 "Deleted messages... contains elmo-killed-msgs-list.")
89 (defvar elmo-msgdb-validity-filename "validity")
90 (defvar elmo-msgdb-flist-filename "flist"
91 "Folder list cache (for access folder).")
92 (defvar elmo-msgdb-finfo-filename "finfo"
93 "Folder information cache...list of '(filename . '(new unread all)).")
94 (defvar elmo-msgdb-append-list-filename "append"
95 "Appended messages...Structure is same as number-alist.
96 For disconnected operations.")
97 (defvar elmo-msgdb-resume-list-filename "resume"
98 "Resumed messages. For disconnected operations.")
99 (defvar elmo-msgdb-lock-list-filename "lock"
100 "Locked messages...list of message-id.
101 For disconnected operations.")
102 (defvar elmo-msgdb-global-mark-filename "global-mark"
103 "Alist of global mark.")
104 (defvar elmo-lost+found-folder "+lost+found"
106 (defvar elmo-crosspost-alist-filename "crosspost-alist"
107 "Alist of crosspost messages.")
109 (defvar elmo-use-server-diff t
110 "Non-nil forces to get unread message information on server.")
112 (defvar elmo-strict-diff-folder-list nil
113 "List of regexps of folder name which should be checked its diff strictly.")
115 (defvar elmo-msgdb-extra-fields nil
116 "Extra fields for msgdb.")
118 (defvar elmo-queue-filename "queue"
119 "*IMAP pending event queue is saved in this file.")
120 (defvar elmo-enable-disconnected-operation nil
121 "*Enable disconnected operations.")
124 (defvar elmo-auto-change-plugged 600
125 "*Time to expire change plugged state automatically, as the number of seconds.
126 Don't change plugged state automatically if nil.")
127 (defvar elmo-plugged-condition 'one
128 "*The condition for `elmo-plugged' becomes on.
129 If `all', when all ports are on. If `one', when even one port is on.
130 If `independent', independent port plugged.
131 If function, return value of function.")
133 (defvar elmo-plug-on-servers nil)
135 (defvar elmo-plug-on-exclude-servers
138 (and (string-match "[^.]+" (system-name))
139 (substring (system-name) 0 (match-end 0)))))
141 (defvar elmo-plugged-alist nil)
143 (defvar elmo-dop-flush-confirm t
144 "*Flush disconnected operations queue with confirmation.")
146 (defvar elmo-path-sep "/"
148 (defvar elmo-plugged t)
149 (defvar elmo-use-semi nil)
151 (defvar elmo-no-subject "(No Subject in original.)"
152 "*A string used when no subject field exists.")
153 (defvar elmo-no-from "nobody@nowhere?"
154 "*A string used when no from field exists.")
156 ;; database dynamic linking
157 (defvar elmo-database-dl-module
158 (expand-file-name "database.so" exec-directory))
160 (defvar elmo-database-dl-handle
161 (if (and (fboundp 'dynamic-link)
163 elmo-database-dl-module))
164 (if (fboundp 'open-database)
166 (dynamic-link elmo-database-dl-module))))
168 (if (and elmo-database-dl-handle
169 (integerp elmo-database-dl-handle))
170 (dynamic-call "emacs_database_init" elmo-database-dl-handle))
172 (defvar elmo-use-database (or (featurep 'dbm)
175 (featurep 'berkeley-db)
176 ;; static/dl-database
177 (fboundp 'open-database)))
179 (defvar elmo-date-match (not (boundp 'nemacs-version))
180 "Date match is available or not.")
182 (defvar elmo-network-stream-type-alist
183 '(("!" ssl ssl open-ssl-stream)
184 ("!!" starttls starttls starttls-open-stream)
185 ("!socks" socks socks socks-open-network-stream))
186 "An alist of (SPEC-STRING SYMBOL FEATURE OPEN-STREAM-FUNCTION).
187 SPEC-STRING is a string for stream-type spec (it must start with '!').
188 SYMBOL is a symbol which indicates the name of the stream type.
189 SYMBOL should be identical in this alist.
190 FEATURE is a symbol of the feature for OPEN-STREAM-FUNCTION.
191 OPEN-STREAM-FUNCTION is a function to open network stream.
192 Arguments for this function are NAME, BUFFER, HOST and SERVICE.")
194 (defvar elmo-folder-info-hashtb nil
195 "Array of folder database information '(max length new unread).")
197 (defvar elmo-crosspost-message-alist nil
198 "List of crosspost message.")
200 (defvar elmo-cache-expire-default-method "size"
201 "Default expiration method.")
203 (defvar elmo-cache-expire-default-size 30000
204 "Cache expiration disk size (Kilo bytes). This must be float value.")
206 (defvar elmo-cache-expire-default-age 50
207 "Cache expiration age (days).")
209 (defvar elmo-cache-dirname "cache"
210 "Directory name for cache storage.")
212 (defvar elmo-pack-number-check-strict t
213 "Pack number strictly.")
215 (defvar elmo-have-link-count
217 ;; OS/2: EMX always returns the link count "1" :-(
218 (or (memq system-type '(OS/2 emx))
219 ;; Meadow seems to have pseudo link count.(suggestion by S.YAMAGUCHI)
220 (and (eq system-type 'windows-nt) (not (featurep 'meadow)))))
221 "Your file system has link count, or not.")
223 (defvar elmo-weekday-name-en '["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"])
224 (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"])
225 (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
226 (defvar elmo-weekday-name-de '["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"])
228 (defvar elmo-filename-replace-string-alist
239 (defvar elmo-hash-minimum-size 1023
240 "Minimum size of hash table.")
242 (defvar elmo-hash-maximum-size 4095
243 "Maximum size of hash table.")
245 (defvar elmo-use-decoded-cache (featurep 'xemacs)
246 "Use cache of decoded mime charset string.")
248 (defvar elmo-use-overview-hashtb t
249 "Use hash table of overview.")
251 (defvar elmo-display-progress-threshold 20
252 "*Displaying progress gauge if number of messages are more than this value.")
254 (defvar elmo-inhibit-number-mapping nil
255 "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
257 (defvar elmo-dop-queue nil
258 "Global variable for storing disconnected operation queues.")
261 (product-provide (provide 'elmo-vars) (require 'elmo-version))
263 ;;; elmo-vars.el ends here