d9869e78d3f2678a68a2f4f6d417b726f97a2715
[elisp/wanderlust.git] / wl / wl-vars.el
1 ;;; wl-vars.el -- Variable definitions for Wanderlust.
2
3 ;; Copyright (C) 1998,1999,2000,2001 Yuuichi Teranishi <teranisi@gohome.org>
4 ;; Copyright (C) 1998,1999,2000,2001 Masahiro MURATA <muse@ba2.so-net.ne.jp>
5
6 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
7 ;;      Masahiro MURATA <muse@ba2.so-net.ne.jp>
8 ;; Keywords: mail, net news
9
10 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
11
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16 ;;
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21 ;;
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26 ;;
27
28 ;;; Commentary:
29 ;;
30
31 ;;; Code:
32 ;;
33
34 (require 'elmo-vars)
35
36 (if (module-installed-p 'custom)
37     (require 'custom))
38
39 ;;; Customizable Variables
40
41 (defgroup wl nil
42   "Wanderlust, a news and mail reading software."
43   :tag "Wanderlust"
44   :link (` (custom-manual
45             (, (if (and (boundp 'current-language-environment)
46                         (string-equal "Japanese"
47                                       (symbol-value 'current-language-environment)))
48                    "(wl-ja)Top"
49                  "(wl)Top"))))
50   :group 'news
51   :group 'mail)
52
53 (defgroup wl-pref nil
54   "Wanderlust, Preferences."
55   :prefix "wl-"
56   :group 'wl)
57
58 (defgroup wl-folder nil
59   "Wanderlust, folder buffer."
60   :prefix "wl-"
61   :group 'wl)
62
63 (defgroup wl-summary nil
64   "Wanderlust, summary buffer."
65   :prefix "wl-"
66   :group 'wl)
67
68 (defgroup wl-summary-marks nil
69   "Wanderlust, marks used in summary buffers."
70   :prefix "wl-summary-"
71   :group 'wl-summary)
72
73 (defgroup wl-expire nil
74   "Wanderlust, Expiring and archiving."
75   :prefix "wl-"
76   :group 'wl)
77
78 (defgroup wl-score nil
79   "Wanderlust, Score file handling."
80   :prefix "wl-"
81   :group 'wl)
82
83 (defgroup wl-highlight nil
84   "Wanderlust, Highlights."
85   :prefix "wl-"
86   :group 'wl)
87
88 (defgroup wl-draft nil
89   "Wanderlust, draft mode."
90   :prefix "wl-"
91   :group 'wl)
92
93 ;;; Emacsen
94 (defconst wl-on-xemacs (featurep 'xemacs))
95
96 (defconst wl-on-emacs21 (and (not wl-on-xemacs)
97                              (>= emacs-major-version 21)))
98
99 (defconst wl-on-nemacs (fboundp 'nemacs-version))
100
101 (defconst wl-on-mule (featurep 'mule))
102
103 (defconst wl-on-mule3
104   (and wl-on-mule (or wl-on-xemacs
105                       (> emacs-major-version 19))))
106
107 (eval-when-compile
108   (defun-maybe locate-data-directory (a)))
109
110 (defvar wl-cs-noconv
111   (cond (wl-on-mule3 'binary)
112         (wl-on-mule  '*noconv*)
113         (wl-on-nemacs 0)
114         (t           nil)))
115
116 (defvar wl-cs-autoconv
117   (cond (wl-on-mule3 'undecided)
118         (wl-on-mule  '*autoconv*)
119         (wl-on-nemacs 2) ; junet...
120         (t           nil)))
121
122 (defvar wl-cs-local
123   (cond (wl-on-mule3  'junet)
124         (wl-on-mule   '*junet*)
125         (wl-on-nemacs 2)
126         (t           nil)))
127
128 (defvar wl-cs-cache wl-cs-local)
129
130 (defvar wl-use-semi (module-installed-p 'mime-view) ; If nil, use tm.
131   "*Use SEMI or not.")
132
133 (defcustom wl-from (if (boundp 'user-mail-address)
134                        user-mail-address)
135   "*From string used in draft."
136   :type 'string
137   :group 'wl)
138
139 (defcustom wl-user-mail-address-list nil
140   "*A list of user's mail addresses.
141 This list is used to judge whether an address is user's or not.
142 You should set this variable if you use multiple e-mail addresses.
143 If you don't have multiple e-mail addresses, you don't have to set this."
144   :type '(repeat string)
145   :group 'wl)
146
147 (defcustom wl-organization nil
148   "Organization name."
149   :type '(choice (const :tag "none" nil)
150                  string)
151   :group 'wl)
152
153 (defcustom wl-tmp-dir "~/tmp/"
154   "*Default temporary directory to save message, part."
155   :type 'directory
156   :group 'wl)
157
158 (defcustom wl-icon-dir (if (fboundp 'locate-data-directory)
159                            (locate-data-directory "wl")
160                          (let ((icons (expand-file-name "wl/icons/"
161                                                         data-directory)))
162                            (if (file-directory-p icons)
163                                icons)))
164   "*Icon directory (XEmacs or Emacs 21)."
165   :type '(choice (const :tag "none" nil)
166                  string)
167   :group 'wl)
168
169 (defcustom wl-summary-from-func 'wl-summary-default-from
170   "*A function for displaying sender (From: field) information."
171   :type 'function
172   :group 'wl-summary)
173
174 (defcustom wl-summary-subject-func 'wl-summary-default-subject
175   "*A function for displaying subject."
176   :type 'function
177   :group 'wl-summary)
178
179 (defcustom wl-summary-subject-filter-func 'wl-summary-default-subject-filter
180   "*A filter function for comparing subjects."
181   :type 'function
182   :group 'wl-summary)
183
184 (defcustom wl-summary-search-parent-by-subject-regexp "^[ \t]*\\(\\[[^:]+[,: ][0-9]+\\]\\)?[ \t]*re[\\^[:> ]"
185   "*If message does not have in-reply-to field nor references field and
186  subject matches this regexp, search parent message by subject matching."
187   :type 'string
188   :group 'wl-summary)
189
190 (defcustom wl-summary-update-confirm-threshold 500
191   "*Confirm updating summary if message number is larger than this value."
192   :type 'integer
193   :group 'wl-summary)
194
195 ;; Important folders
196 (defcustom wl-default-folder "%inbox"
197   "*Default folder used in `wl-summary-goto-folder'."
198   :type 'string
199   :group 'wl)
200 (defcustom wl-draft-folder "+draft"
201   "*Draft folder"
202   :type 'string
203   :group 'wl)
204 (defcustom wl-trash-folder "+trash"
205   "*Trash folder"
206   :type 'string
207   :group 'wl)
208 (defcustom wl-queue-folder "+queue"
209   "*Queue folder"
210   :type 'string
211   :group 'wl)
212
213 (defcustom wl-default-spec "%"
214   "*Default spec"
215   :type 'string
216   :group 'wl)
217
218 (defcustom wl-insert-mail-followup-to nil
219   "*Insert Mail-Followup-To: field if non-nil."
220   :type 'boolean
221   :group 'wl-draft)
222
223 (defcustom wl-insert-mail-reply-to nil
224   "*Insert Mail-Reply-To: field if non-nil."
225   :type 'boolean
226   :group 'wl-draft)
227
228 (defcustom wl-insert-message-id t
229   "*Insert Message-ID: field if non-nil."
230   :type 'boolean
231   :group 'wl-draft)
232
233 (defcustom wl-auto-insert-x-face t
234   "*Insert X-Face: field automatically."
235   :type 'boolean
236   :group 'wl-draft)
237
238 (defcustom wl-x-face-file "~/.xface"
239   "*X-Face field is inserted using its contents.
240 If file exists and `wl-auto-insert-x-face' is non-nil."
241   :type 'file
242   :group 'wl-draft)
243
244 (defcustom wl-subscribed-mailing-list nil
245   "*Subscribed mailing list.
246 You had better set this variable if you set 'wl-insert-mail-followup-to' as t."
247   :type '(repeat string)
248   :group 'wl-pref)
249
250 (defcustom wl-demo t
251   "*Display demo at start time."
252   :type 'boolean
253   :group 'wl-pref)
254
255 (defcustom wl-envelope-from nil
256   "*Envelope From used in SMTP.
257 If nil, `wl-from' is used."
258   :type '(choice (const :tag "Same as 'From' field." nil)
259                  string)
260   :group 'wl)
261
262 (defcustom wl-draft-add-references t
263   "*If non-nil, message-id of the cited message is inserted to the
264 references field of the current draft."
265   :type 'boolean
266   :group 'wl)
267
268 (defcustom wl-smtp-connection-type nil
269   "*SMTP connection type.
270 If nil, default smtp connection type is used."
271   :type '(choice (const :tag "default" nil)
272                  (const :tag "Use STARTTLS" starttls)
273                  symbol)
274   :group 'wl)
275
276 (defcustom wl-smtp-posting-user nil
277   "*SMTP authentication user."
278   :type '(choice (const :tag "none" nil)
279                  string)
280   :group 'wl)
281
282 (defcustom wl-smtp-posting-server nil
283   "*SMTP server name to send mail (wl-draft-send-mail-with-smtp)."
284   :type '(choice (const :tag "none" nil)
285                  string)
286   :group 'wl)
287
288 (defcustom wl-smtp-posting-port nil
289   "*SMTP port number in `wl-smtp-posting-server'.
290 If nil, default SMTP port number(25) is used."
291   :type '(choice (const :tag "Default (25)" nil)
292                  integer)
293   :group 'wl)
294
295 (defcustom wl-smtp-authenticate-type nil
296   "*SMTP Authentication type.
297 If nil, don't authenticate."
298   :type '(choice (const :tag "none" nil)
299                  (const :tag "PLAIN" "plain")
300                  (const :tag "CRAM-MD5" "cram-md5")
301                  (const :tag "LOGIN" "login")
302                  (string :tag "Other"))
303   :group 'wl)
304
305 (defcustom wl-pop-before-smtp-user nil
306   "*POP3 user name to send mail using POP-before-SMTP.
307 If nil, `elmo-default-pop3-user' is used.
308 To use POP-before-SMTP,
309 (setq wl-draft-send-mail-func 'wl-draft-send-mail-with-pop-before-smtp)"
310   :type '(choice (const :tag "none" nil)
311                  string)
312   :group 'wl)
313
314 (defcustom wl-pop-before-smtp-server nil
315   "*POP3 server for POP-before-SMTP.
316 If nil, `elmo-default-pop3-server' is used."
317   :type '(choice (const :tag "none" nil)
318                  string)
319   :group 'wl)
320
321 (defcustom wl-pop-before-smtp-port nil
322   "*POP3 port for POP-before-SMTP.
323 If nil, `elmo-default-pop3-port' is used."
324   :type '(choice (const :tag "none" nil)
325                  integer string)
326   :group 'wl)
327
328 (defcustom wl-pop-before-smtp-stream-type nil
329   "*Stream type for POP-before-SMTP.
330 If nil, `elmo-default-pop3-stream-type' is used."
331   :type 'boolean
332   :group 'wl)
333
334 (defcustom wl-pop-before-smtp-authenticate-type nil
335   "*Default Authentication type for POP-before-SMTP.
336 If nil, `elmo-default-pop3-authenticate-type' is used."
337   :type '(choice (const :tag "none" nil)
338                  (const :tag "APOP" "apop")
339                  (const :tag "POP3" "user"))
340   :group 'wl)
341
342 (defcustom wl-nntp-posting-server nil
343   "*NNTP server name to post news.
344 If nil, `elmo-default-nntp-server' is used."
345   :type '(choice (const :tag "none" nil)
346                  string)
347   :group 'wl)
348 (defcustom wl-nntp-posting-user nil
349   "*NNTP user name to post news for authinfo.
350 If nil, `elmo-default-nntp-user' is used.
351 If nil, don't authenticate."
352   :type '(choice (const :tag "none" nil)
353                  string)
354   :group 'wl)
355 (defcustom wl-nntp-posting-port nil
356   "*NNTP port to post news.
357 If nil, `elmo-default-nntp-port' is used."
358   :type '(choice (const :tag "none" nil)
359                  integer string)
360   :group 'wl)
361 (defcustom wl-nntp-posting-stream-type nil
362   "*Stream type for posting Netnews.
363 If nil, `elmo-default-nntp-stream-type' is used."
364   :type 'boolean
365   :group 'wl)
366
367 (defcustom wl-fetch-confirm-threshold 30000
368   "*Confirm fetching if message size is larger than this value."
369   :type 'integer
370   :group 'wl-pref)
371
372 (defcustom wl-prefetch-confirm t
373   "*Confirm prefetching if message size is larger than `wl-prefetch-threshold'."
374   :type 'boolean
375   :group 'wl-pref)
376
377 (defcustom wl-prefetch-threshold 30000
378   "*Maximum size of message prefetched without confirmation.
379 If nil, all messages prefetched regardless of its size.
380 If message size is larger than this value, confirm prefetching
381 when `wl-prefetch-confirm' is non-nil."
382   :type '(choice (integer :tag "Threshold (bytes)")
383                  (const :tag "No limitation" nil))
384   :group 'wl-pref)
385
386 (defcustom wl-cache-prefetch-threshold 30000
387   "*Quit forward cache prefetching if message size is larger than this value."
388   :type 'integer
389   :group 'wl-pref)
390
391 (defcustom wl-thread-insert-opened nil
392   "*Non-nil forces to insert thread as opened in updating."
393   :type 'boolean
394   :group 'wl-summary)
395
396 (defcustom wl-thread-open-reading-thread t
397   "*Non-nil forces to open reading thread."
398   :type 'boolean
399   :group 'wl-summary)
400
401 ;;;; Hooks
402 (defvar wl-folder-mode-hook nil
403   "A hook called when wanderlust folder mode is started.
404 This hook may contain the functions `wl-folder-init-icons' and
405 `wl-setup-folder' for reasons of system internal to accord facilities
406 for the Emacs variants.")
407 (defvar wl-summary-toggle-disp-on-hook nil
408   "A hook called when message is toggled.")
409 (defvar wl-summary-toggle-disp-off-hook nil
410   "A hook called when message is disappeared.")
411 (defvar wl-summary-toggle-disp-folder-on-hook nil
412   "A hook called when folder is toggled.")
413 (defvar wl-summary-toggle-disp-folder-off-hook nil
414   "A hook called when folder is disappeared.")
415 (defvar wl-summary-toggle-disp-folder-message-resumed-hook nil
416   "A hook called when message window is resumed when folder is toggled.")
417 (defvar wl-summary-mode-hook nil
418   "A hook called when summary mode is started.
419 This hook may contain the function `wl-setup-summary' for reasons of
420 system internal to accord facilities for the Emacs variants.")
421
422 (defvar wl-summary-prepared-pre-hook nil
423   "A hook called before the summary buffer has been generated.")
424 (defvar wl-summary-prepared-hook nil
425   "A hook called after the summary buffer has been generated.")
426 (defvar wl-summary-sync-updated-hook nil
427   "A hook called when update summary buffer.")
428 (defvar wl-summary-unread-message-hook nil
429   "A hook called when unread message is displayed.")
430 (defvar wl-summary-edit-addresses-hook nil
431   "A hook called when address book is edited.")
432 (defvar wl-summary-buffer-message-saved-hook nil
433   "A hook called when msgdb is saved.")
434 (defvar wl-summary-buffer-mark-saved-hook nil
435   "A hook called when mark is saved.")
436 (defvar wl-summary-divide-thread-when-subject-changed nil
437   "Divide thread when subject is changed.")
438 (defvar wl-init-hook nil
439   "A hook called when initialization is finished.  This hook may contain
440 the functions `wl-plugged-init-icons' and `wl-biff-init-icons' for
441 reasons of system internal to accord facilities for the Emacs variants.")
442 (defvar wl-hook nil
443   "A hook called when Wanderlust is invoked.")
444 (defvar wl-reply-hook nil
445   "A hook called when replied.")
446 (defvar wl-mail-setup-hook nil
447   "A hook called when Draft is prepared.")
448 (defvar wl-draft-reedit-hook nil
449   "A hook called when Draft is re-edited.")
450 (defvar wl-draft-send-hook '(wl-draft-config-exec)
451   "A hook called on the draft editing buffer before sending process starts.")
452 (defvar wl-mail-send-pre-hook nil
453   "A hook called just before the mail sending process starts.")
454 (defvar wl-news-send-pre-hook nil
455   "A hook called just before the news sending process starts.")
456 (defvar wl-message-buffer-created-hook nil
457   "A hook called when Message buffer is prepared.")
458 (defvar wl-message-redisplay-hook nil
459   "A hook called when Message is displayed.")
460 (defvar wl-message-exit-hook nil
461   "A hook called when quit message.")
462 (defvar wl-summary-exit-hook nil
463   "A hook called when exit summary mode.")
464 (defvar wl-highlight-headers-hook nil
465   "A hook called when header is highlighted.")
466 (defvar wl-highlight-message-hook nil
467   "A hook called when message is highlighted.")
468 (defvar wl-save-hook nil
469   "A hook called when save summary and folder status.")
470 (defvar wl-exit-hook nil
471   "A hook called when exit wanderlust.")
472 (defvar wl-folder-suspend-hook nil
473   "A hook called when suspend wanderlust.")
474 (defvar wl-biff-notify-hook nil
475   "A hook called when a biff-notification is invoked.")
476 (defvar wl-biff-unnotify-hook nil
477   "A hook called when a biff-notification is removed.")
478 (defvar wl-auto-check-folder-pre-hook nil
479   "A hook called before auto check folders.")
480 (defvar wl-auto-check-folder-hook nil
481   "A hook called when auto check folders.")
482 (defvar wl-folder-check-entity-pre-hook nil
483   "A hook called before check entity.")
484 (defvar wl-folder-check-entity-hook nil
485   "A hook called when check entity.")
486 (defvar wl-draft-config-exec-hook nil
487   "A hook called when execute header-config on draft.")
488 (defvar wl-summary-expire-pre-hook nil
489   "A hook called before expire.")
490 (defvar wl-summary-expire-hook nil
491   "A hook called when expired.")
492 (defvar wl-summary-archive-pre-hook nil
493   "A hook called before archive.")
494 (defvar wl-summary-archive-hook nil
495   "A hook called when archived.")
496 (defvar wl-summary-line-inserted-hook nil
497   "A hook called when summary line is inserted.")
498 (defvar wl-summary-insert-headers-hook nil
499   "A hook called when insert header for search header.")
500 (defvar wl-thread-update-children-number-hook nil
501   "A hook called when children number is updated.")
502 (defvar wl-folder-update-access-group-hook nil
503   "A hook called when update access group folder.")
504 (defvar wl-draft-cited-hook nil
505   "A hook called after a message is cited.")
506 (defvar wl-draft-insert-x-face-field-hook nil
507   "A hook called after a x-face field is inserted.")
508 (defvar wl-template-mode-hook nil
509   "A hook called when template mode is started.")
510 (defvar wl-score-mode-hook nil
511   "A hook called when score mode is started.")
512 (defvar wl-make-plugged-hook nil
513   "A hook called when make plugged alist.")
514
515 (defvar wl-plugged-exit-hook nil
516   "A hook called when exit plugged mode.")
517
518 ;;;; functions for draft
519 (defcustom wl-draft-send-func 'wl-draft-normal-send-func
520   "A function to send message."
521   :type 'function
522   :group 'wl-draft)
523
524 (defcustom wl-draft-send-news-func 'wl-draft-elmo-nntp-send
525   "A function to send news."
526   :type 'function
527   :group 'wl-draft)
528
529 (defcustom wl-draft-send-mail-func 'wl-draft-send-mail-with-smtp
530   "A function to send mail.
531 Prepared candidates are 'wl-draft-send-mail-with-smtp,
532 'wl-draft-send-mail-with-qmail and 'wl-draft-send-mail-with-pop-before-smtp."
533   :type '(radio (function-item wl-draft-send-mail-with-smtp)
534                 (function-item wl-draft-send-mail-with-qmail)
535                 (function-item wl-draft-send-mail-with-pop-before-smtp)
536                 (function :tag "Other"))
537   :group 'wl-draft)
538
539 (defcustom wl-draft-reply-with-argument-list
540   '(("Reply-To" . (("Reply-To") nil nil))
541     ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
542     ("From" . (("From") nil nil)))
543   "Alist of cons cell of
544 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
545 'field-name' is a string.
546 'fields for ***' is a list of strings.
547 If car of each cons cell exists in original message,
548 cdr of each cons cell is used for draft message.
549 Default is for 'reply-to-author'."
550   :type '(repeat (cons (choice (string :tag "Field Name")
551                                (repeat (string :tag "Field Name")))
552                        (list (repeat :tag "Fields For To" string)
553                              (repeat :tag "Fields For Cc" string)
554                              (repeat :tag "Fields For Newsgroups" string))))
555   :group 'wl-draft)
556
557 (defcustom wl-draft-reply-without-argument-list
558   '(("Followup-To" . (nil nil ("Followup-To")))
559     ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
560     ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups")))
561     ("From" . (("From") ("To" "Cc") ("Newsgroups"))))
562   "Alist of cons cell of
563 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
564 'field-name' is a string.
565 'fields for ***' is a list of strings.
566 If car of each cons cell exists in original message,
567 cdr of each cons cell is used for draft message.
568 Default is for 'reply-to-all'."
569   :type '(repeat (cons (choice (string :tag "Field Name")
570                                (repeat (string :tag "Field Name")))
571                        (list (repeat :tag "Fields For To" string)
572                              (repeat :tag "Fields For Cc" string)
573                              (repeat :tag "Fields For Newsgroups" string))))
574   :group 'wl-draft)
575
576 (defcustom wl-draft-reply-myself-with-argument-list
577   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
578     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
579     ("From" . (("To") ("Cc") nil)))
580   "Alist of cons cell of
581 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
582 'field-name' is a string.
583 'fields for ***' is a list of strings.
584 If car of each cons cell exists in original message,
585 cdr of each cons cell is used for draft message.
586 Default is for 'reply-to-me'."
587   :type '(repeat (cons (choice (string :tag "Field Name")
588                                (repeat (string :tag "Field Name")))
589                        (list (repeat :tag "Fields For To" string)
590                              (repeat :tag "Fields For Cc" string)
591                              (repeat :tag "Fields For Newsgroups" string))))
592   :group 'wl-draft)
593
594 (defcustom wl-draft-reply-myself-without-argument-list
595   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
596     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
597     ("From" . (("To") ("Cc") nil)))
598   "Alist of cons cell of
599 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
600 'field-name' is a string.
601 'fields for ***' is a list of strings.
602 If car of each cons cell exists in original message,
603 cdr of each cons cell is used for draft message.
604 Default is for 'followup-to-me'."
605   :type '(repeat (cons (choice (string :tag "Field Name")
606                                (repeat (string :tag "Field Name")))
607                        (list (repeat :tag "Fields For To" string)
608                              (repeat :tag "Fields For Cc" string)
609                              (repeat :tag "Fields For Newsgroups" string))))
610   :group 'wl-draft)
611
612 (defcustom wl-draft-always-delete-myself nil
613   "*Always delete myself from reciepient if non-nil."
614   :type 'boolean
615   :group 'wl-draft)
616
617 (defcustom wl-draft-delete-myself-from-bcc-fcc nil
618   "*Do not insert bcc or fcc if To and Cc fields is a member of
619 `wl-subscribed-mailing-list'"
620   :type 'boolean
621   :group 'wl-draft)
622
623 (defcustom wl-draft-resume-folder-window t
624   "*Resume folder window in `wl-draft-hide'."
625   :type 'boolean
626   :group 'wl-draft)
627
628 (defcustom wl-draft-use-frame nil
629   "*Raise new frame when composing draft."
630   :type 'boolean
631   :group 'wl-draft)
632
633 (defcustom wl-draft-qmail-send-plugged nil
634   "*Send mail when plugged is on, in the `wl-draft-send-mail-with-qmail'."
635   :type 'boolean
636   :group 'wl-draft)
637
638 (defcustom wl-draft-remove-group-list-contents t
639   "*If non-nil, remove group list contents in `wl-draft-send-mail-with-smtp'."
640   :type 'boolean
641   :group 'wl-draft)
642
643 ;;;;
644 (defcustom wl-init-file "~/.wl"
645   "*User customization setting file."
646   :type 'file
647   :group 'wl)
648
649 (defcustom wl-folders-file "~/.folders"
650   "*Folders file."
651   :type 'file
652   :group 'wl)
653
654 (defcustom wl-address-file "~/.addresses"
655   "*Addresses file."
656   :type 'file
657   :group 'wl)
658
659 (defcustom wl-alias-file "~/.im/Aliases"
660   "*Alias file for completion."
661   :type 'file
662   :group 'wl)
663
664 (defcustom wl-ldap-server "localhost"
665   "*LDAP server."
666   :type '(string :tag "Server")
667   :group 'wl)
668
669 (defcustom wl-ldap-port nil
670   "*LDAP port."
671   :type '(choice (const :tag "Default port" nil)
672                  integer)
673   :group 'wl)
674
675 (defcustom wl-ldap-base "c=US"
676   "*LDAP base."
677   :type '(string :tag "Base")
678   :group 'wl)
679
680 (defcustom wl-use-ldap nil
681   "*If non-nil, use LDAP for address completion."
682   :type 'boolean
683   :group 'wl)
684
685 (defcustom wl-folder-info-save t
686   "If non-nil, save elmo-folder-info-alist."
687   :type 'boolean
688   :group 'wl-folder)
689
690 (defcustom wl-summary-unread-mark "!"
691   "Mark for unread message."
692   :type '(string :tag "Mark")
693   :group 'wl-summary-marks)
694 (defcustom wl-summary-important-mark "$"
695   "Mark for important message."
696   :type '(string :tag "Mark")
697   :group 'wl-summary-marks)
698 (defcustom wl-summary-new-mark "N"
699   "Mark for new message."
700   :type '(string :tag "Mark")
701   :group 'wl-summary-marks)
702 (defcustom wl-summary-unread-uncached-mark "U"
703   "Mark for unread and uncached message."
704   :type '(string :tag "Mark")
705   :group 'wl-summary-marks)
706 (defcustom wl-summary-unread-cached-mark "!"
707   "Mark for unread but already cached message."
708   :type '(string :tag "Mark")
709   :group 'wl-summary-marks)
710 (defcustom wl-summary-read-uncached-mark "u"
711   "Mark for read but uncached message."
712   :type '(string :tag "Mark")
713   :group 'wl-summary-marks)
714 (defcustom wl-summary-score-over-mark "+"
715   "Score mark used for messages with high scores."
716   :type '(string :tag "Mark")
717   :group 'wl-summary-marks)
718 (defcustom wl-summary-score-below-mark "-"
719   "Score mark used for messages with low scores."
720   :type '(string :tag "Mark")
721   :group 'wl-summary-marks)
722
723 (defcustom wl-summary-no-mime-folder-list
724   (list (concat "^" (regexp-quote wl-draft-folder) "$"))
725   "*All folders that match this list don't analysis mime."
726   :type '(repeat string)
727   :group 'wl-summary)
728
729 (defcustom wl-summary-fix-timezone nil
730   "*Time zone of the date string in summary mode. 
731 If nil, it is adjust to the default time zone information
732 \(system's default time zone or environment variable TZ\)."
733   :type '(choice (const :tag "Default time zone" nil)
734                  string)
735   :group 'wl-summary)
736
737 (defcustom wl-summary-default-score 0
738   "*Default message score level.
739 All scores generated by the score files will be added to this score.
740 If this variable is nil, scoring will be disabled."
741   :type '(choice (const :tag "disable" nil)
742                  integer)
743   :group 'wl-score)
744
745 (defcustom wl-summary-important-above nil
746   "*Mark all messages with a score above this variable as important.
747 This variable is local to the summary buffers."
748   :type '(choice (const :tag "off" nil)
749                  integer)
750   :group 'wl-score)
751
752 (defcustom wl-summary-target-above nil
753   "*Mark all messages with a score above this variable as target.
754 This variable is local to the summary buffers."
755   :type '(choice (const :tag "off" nil)
756                  integer)
757   :group 'wl-score)
758
759 (defcustom wl-summary-mark-below 0
760   "*Mark all messages with a score below this variable as read.
761 This variable is local to each summary buffer and usually set by the
762 score file."
763   :type 'integer
764   :group 'wl-score)
765
766 (defcustom wl-summary-expunge-below nil
767   "All messages that have a score less than this variable will be expunged.
768 This variable is local to the summary buffers."
769   :type '(choice (const :tag "off" nil)
770                  integer)
771   :group 'wl-score)
772
773 (defcustom wl-summary-score-marks
774   (list wl-summary-new-mark)
775   "Persistent marks to scoring."
776   :type '(repeat (string :tag "Mark"))
777   :group 'wl-score)
778
779 (defcustom wl-use-scoring (not wl-on-nemacs)
780   "*If non-nil, enable scoring."
781   :type 'boolean
782   :group 'wl-pref)
783
784 (defcustom wl-summary-rescore-partial-threshold 200
785   "*Summary is not scored entirely if there are messages more than this value.
786 In sync-all or rescan."
787   :type 'integer
788   :group 'wl-score)
789
790 (defcustom wl-score-files-dir (concat elmo-msgdb-dir elmo-path-sep)
791   "*Name of the directory where score files will be stored.
792 (default \"~/.elmo\")."
793   :type 'directory
794   :group 'wl)
795
796 (defcustom wl-score-interactive-default-score 1000
797   "*Scoring commands will raise/lower the score with this number as the default."
798   :type 'integer
799   :group 'wl-score)
800
801 (defcustom wl-score-expiry-days 7
802   "*Number of days before unused score file entries are expired.
803 If this variable is nil, no score file entries will be expired."
804   :type '(choice (const :tag "never" nil)
805                  number)
806   :group 'wl-score)
807
808 (defcustom wl-score-update-entry-dates t
809   "*In non-nil, update matching score entry dates.
810 If this variable is nil, then score entries that provide matches
811 will be expired along with non-matching score entries."
812   :type 'boolean
813   :group 'wl-score)
814
815 (defcustom wl-score-folder-alist nil
816   "*Alist of folder regexp and score file."
817   :type '(repeat (list (regexp :tag "Folder Regexp")
818                        (repeat :inline t
819                                (choice file
820                                        (symbol :tag "Variable")))))
821   :group 'wl-score)
822
823 (defcustom wl-score-folder-alist-matchone t
824   "*If non-nil, getting only one element of `wl-score-folder-alist'."
825   :type 'boolean
826   :group 'wl-score)
827
828 (defcustom wl-score-default-file "all.SCORE"
829   "*Default score file name."
830   :type 'file
831   :group 'wl-score)
832
833 (defcustom wl-score-simplify-fuzzy-regexp
834   '("^[ \t]*\\[[^:]+[,: ][0-9]+\\][ \t]*")
835   "*Strings to be removed when doing fuzzy matches.
836 This can either be a regular expression or list of regular expressions."
837   :type '(repeat regexp)
838   :group 'wl-score)
839
840 (defcustom wl-score-header-default-entry
841   '(("number" -1000 perm =)
842     ("subject" -1000 nil nil)
843     ("from" -1000 perm s)
844     ("message-id" -1000 temp e)
845     ("references" -1000 perm e)
846     ("to" -1000 perm s)
847     ("cc" -1000 perm s)
848     ("date" -1000 temp nil)
849     ("xref" -1000 perm s)
850     ("extra" -1000 perm s)
851     ("chars" -1000 perm >)
852     ("lines" -1000 perm >)
853     ("followup" -1000 perm s)
854     ("thread" -1000 temp s))
855   "*Default entry when insert score entry."
856   :type '(repeat (list (string :tag "Header")
857                        (choice (integer :tag "Score")
858                                (const :tag "Ask" nil))
859                        (choice (const :tag "Permanent" perm)
860                                (const :tag "Temporary" temp)
861                                (const :tag "Ask" nil))
862                        (choice (const :tag "Regexp string" r)
863                                (const :tag "Substring" s)
864                                (const :tag "fuzzy string" f)
865                                (const :tag "Exact string" e)
866                                (const :tag "REGEXP STRING" R)
867                                (const :tag "SUBSTRING" S)
868                                (const :tag "FUZZY STRING" F)
869                                (const :tag "EXACT STRING" E)
870                                (const :tag "less than" <)
871                                (const :tag "less equal" <=)
872                                (const :tag "greater than" >)
873                                (const :tag "greater equal" >=)
874                                (const :tag "equal" =)
875                                (const :tag "Ask" nil))))
876   :group 'wl-score)
877
878 (defcustom wl-score-mode-mime-charset 'x-ctext
879   "*MIME Charset for score file."
880   :type 'symbol
881   :group 'wl-score)
882
883 (defcustom wl-draft-fields
884   '("To:" "Cc:" "Bcc:" "FCC:" "Distribution:" "Organization:"
885     "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:")
886   "Fields used in draft mode."
887   :type '(repeat (string :tag "Field"))
888   :group 'wl-draft)
889
890 (defcustom wl-draft-config-alist nil
891   "Alist of configuration field on draft.
892 ex.
893 '((\"^To: .*wl@lists.airs.net\"
894    (\"From\" . wl-from2)
895    (\"Organization\" . wl-organization2))
896   (\"^To: .*hogehoge@\"
897    (\"From\" . \"Anonymous <hogehoge@aaa.ne.jp>\")
898    wl-my-draft-config-func-hoge))"
899   :type '(repeat (list (sexp :tag "Match")
900                        (repeat
901                         :inline t
902                         (choice (cons (sexp :tag "Field(Variable)")
903                                       (sexp :tag "Value"))
904                                 (sexp :tag "Function")))))
905   :group 'wl-draft)
906
907 (defcustom wl-draft-config-matchone nil
908   "*If non-nil, applied only one element of `wl-draft-config-alist'."
909   :type 'boolean
910   :group 'wl-draft)
911
912 (defcustom wl-template-alist nil
913   "Alist of template."
914   :type '(repeat (list (string :tag "Name")
915                        (repeat
916                         :inline t
917                         (choice (cons (sexp :tag "Field(Variable)")
918                                       (sexp :tag "Value"))
919                                 (sexp :tag "Function")))))
920   :group 'wl-draft)
921
922 (defcustom wl-template-visible-select t
923   "*If non-nil, select template with visible."
924   :type 'boolean
925   :group 'wl-draft)
926
927 (defcustom wl-template-confirm nil
928   "*If non-nil, require your confirmation when selected template."
929   :type 'boolean
930   :group 'wl-draft)
931
932 (defcustom wl-template-buffer-lines 7
933   "*Lines of template buffer."
934   :type 'integer
935   :group 'wl-draft)
936
937 ;; queued sending.
938 (defcustom wl-draft-enable-queuing t
939   "*Non-nil enables queued sending."
940   :type 'boolean
941   :group 'wl-draft
942   :group 'wl-pref)
943
944 (defcustom wl-draft-use-cache nil
945   "*If non-nil, sending message is cached."
946   :type 'boolean
947   :group 'wl-draft
948   :group 'wl-pref)
949
950 (defcustom wl-auto-flush-queue t
951   "*If non-nil, sending queue is flushed when network status is toggled."
952   :type 'boolean
953   :group 'wl-draft
954   :group 'wl-pref)
955
956 (defcustom wl-draft-reply-buffer-style 'split
957   "'split or 'full."
958   :type '(radio (const split)
959                 (const full))
960   :group 'wl-draft)
961
962 (defcustom wl-draft-queue-save-variables
963   '(wl-envelope-from wl-from
964     wl-smtp-posting-server wl-smtp-posting-user wl-smtp-posting-port
965     wl-smtp-authenticate-type wl-smtp-connection-type
966     wl-pop-before-smtp-server wl-pop-before-smtp-user wl-pop-before-smtp-port
967     wl-pop-before-smtp-stream-type wl-pop-before-smtp-authenticate-type
968     wl-nntp-posting-server wl-nntp-posting-server
969     wl-nntp-posting-user wl-nntp-posting-port wl-nntp-posting-stream-type)
970   "*Saving variables in queue info."
971   :type '(repeat (sexp :tag "Variable"))
972   :group 'wl-draft)
973
974 (defcustom wl-draft-sendlog t
975   "*Keep send state in log if non-nil."
976   :type 'boolean
977   :group 'wl-draft)
978
979 (defcustom wl-draft-sendlog-max-size 20000
980   "*Max file size of sendlog."
981   :type 'integer
982   :group 'wl-draft)
983
984 (defcustom wl-summary-default-number-column 5
985   "Number of columns in summary buffer."
986   :type 'integer
987   :group 'wl-summary)
988
989 (defcustom wl-summary-number-column-alist '(("\\*.*" . 6))
990   "Alist of folder and its number column.
991 If no matches, 'wl-summary-default-number-column' is used.
992 ex.
993 '((\"^%inbox@qmail-maildir\" . 9)
994   (\"^-.*@news-server\" . 6))"
995   :type '(repeat (cons (regexp :tag "Folder Regexp") integer))
996   :group 'wl-summary)
997
998 (defcustom wl-summary-highlight t
999   "Non-nil forces Summary buffer to be highlighted."
1000   :type 'boolean
1001   :group 'wl-summary
1002   :group 'wl-highlight)
1003
1004 (defcustom wl-summary-lazy-highlight (and (boundp 'window-scroll-functions)
1005                                           (not wl-on-xemacs))
1006   "Non-nil forces lazy summary highlighting using `window-scroll-functions'."
1007   :type 'boolean
1008   :group 'wl-summary
1009   :group 'wl-highlight)
1010
1011 (defcustom wl-summary-highlight-partial-threshold 1000
1012   "Summary is not highlighted entirely if there are lines more than this value.
1013 Available if only `wl-summary-lazy-highlight' is nil."
1014   :type 'integer
1015   :group 'wl-summary
1016   :group 'wl-highlight)
1017
1018 (defcustom wl-summary-partial-highlight-above-lines 30
1019   "If Summary has lines more than `wl-summary-highlight-partial-threshold',
1020 Summary lines are highlighted partialy above current position.
1021 Available if only `wl-summary-lazy-highlight' is nil."
1022   :type 'integer
1023   :group 'wl-summary
1024   :group 'wl-highlight)
1025
1026 (defcustom wl-summary-cache-use t
1027   "Non-nil forces wl-summary to use cache file."
1028   :type 'boolean
1029   :group 'wl-summary)
1030
1031 (defcustom wl-summary-auto-sync-marks t
1032   "Non-nil forces to synchronize unread/important marks."
1033   :type 'boolean
1034   :group 'wl-summary)
1035
1036 (defcustom wl-summary-cache-file ".wl-summary-cache"
1037   "*Cache file for summary mode contents."
1038   :type 'file
1039   :group 'wl-summary)
1040 (defcustom wl-summary-view-file ".wl-summary-view"
1041   "*Current summary view."
1042   :type 'file
1043   :group 'wl-summary)
1044 (defcustom wl-thread-top-file ".wl-thread-top"
1045   "*Current thread top entity... obsolete."
1046   :type 'file
1047   :group 'wl-summary)
1048 (defcustom wl-thread-entity-file ".wl-thread-entity"
1049   "*Thread entities."
1050   :type 'file
1051   :group 'wl-summary)
1052 (defcustom wl-thread-entity-list-file ".wl-thread-entity-list"
1053   "*Thread top entity list."
1054   :type 'file
1055   :group 'wl-summary)
1056
1057 (defcustom wl-print-buffer-func 'lpr-buffer
1058   "A function to print current buffer."
1059   :type 'function
1060   :group 'wl-pref)
1061
1062 (defcustom wl-ps-print-buffer-func
1063   (if window-system 'ps-print-buffer-with-faces 'ps-print-buffer)
1064   "A function to print current buffer with ps-print."
1065   :type 'function
1066   :group 'wl-pref)
1067
1068 ;;;; Preferences
1069 (defcustom wl-use-petname t
1070   "*Display petname in summary and default citation title."
1071   :type 'boolean
1072   :group 'wl-pref)
1073
1074 (defcustom wl-use-folder-petname
1075   '(modeline)
1076   "*List of situation using folder petname.
1077 Allowed situations are:
1078   modeline    : displayed on modeline.
1079   ask-folder  : displayed on minibuffer when ask folder.
1080   read-folder : can used for completion at `wl-summary-read-folder'."
1081   :type '(set (const modeline)
1082               (const ask-folder)
1083               (const read-folder))
1084   :group 'wl-summary
1085   :group 'wl-pref)
1086
1087 (defcustom wl-folder-petname-alist nil
1088   "A list of (realname . petname)."
1089   :type '(repeat (cons (string :tag "Realname") (string :tag "Petname")))
1090   :group 'wl-folder)
1091
1092 (defcustom wl-summary-weekday-name-lang "ja"
1093   "*Language to display week day."
1094   :type '(choice (const "ja")
1095                  (const "en")
1096                  (const "fr")
1097                  (const "de")
1098                  (string :tag "Other"))
1099   :group 'wl-summary
1100   :group 'wl-pref)
1101
1102 (defcustom wl-local-domain nil
1103   "*Domain part of this client (without hostname).
1104 Set this if (system-name) does not return FQDN."
1105   :type '(choice (const :tag "Use System Name" nil)
1106                  string)
1107   :group 'wl-pref)
1108
1109 (defcustom wl-message-id-domain nil
1110   "*Specific domain part of Message-ID."
1111   :type '(choice (const :tag "Use System Name" nil)
1112                  string)
1113   :group 'wl-pref)
1114
1115 (defcustom wl-break-pages t
1116   "*Break Pages at ^L."
1117   :type 'boolean
1118   :group 'wl-pref)
1119
1120 (defcustom wl-message-scroll-amount 5
1121   "*Scroll amount by SPC key."
1122   :type 'integer
1123   :group 'wl-pref)
1124
1125 (defcustom wl-message-window-size '(1 . 4)
1126   "*Size of summary and message window.  cons cell of (Summary : Message)."
1127   :type '(cons integer integer)
1128   :group 'wl-pref)
1129
1130 (defcustom wl-message-sort-field-list '("Return-Path" "Received" "^To" "^Cc"
1131                                         "Newsgroups" "Subject" "^From")
1132   "*Sort order of header fields.  Each elements are regexp of field name.
1133 (Not valid on tm.)"
1134   :type '(repeat (string :tag "Field Regexp"))
1135   :group 'wl-pref)
1136
1137 (defcustom wl-message-ignored-field-list nil
1138   "All fields that match this list will be hidden in message buffer.
1139 Each elements are regexp of field-name."
1140   :type '(repeat (string :tag "Field Regexp"))
1141   :group 'wl-pref)
1142
1143 (defcustom wl-message-visible-field-list nil
1144   "All fields that match this list will be displayed in message buffer.
1145 Each elements are regexp of field-name."
1146   :type '(repeat (string :tag "Field Regexp"))
1147   :group 'wl-pref)
1148
1149 (defcustom wl-folder-window-width 20
1150   "*Width of folder window."
1151   :type 'integer
1152   :group 'wl-folder
1153   :group 'wl-pref)
1154
1155 (defcustom wl-summary-recenter t
1156   "*Recenter on redisplay."
1157   :type 'boolean
1158   :group 'wl-summary
1159   :group 'wl-pref)
1160
1161 (defcustom wl-folder-use-frame nil
1162   "*Use dedicated frame for folder mode if non-nil."
1163   :type 'boolean
1164   :group 'wl-pref)
1165
1166 (defcustom wl-summary-use-frame nil
1167   "*Use dedicated frame for each folder summary if non-nil."
1168   :type 'boolean
1169   :group 'wl-pref)
1170
1171 (defcustom wl-stay-folder-window nil
1172   "*Stay folder window when folder is selected if non-nil."
1173   :type 'boolean
1174   :group 'wl-pref)
1175
1176 (defcustom wl-reply-subject-prefix "Re: "
1177   "*Prefix of the subject of the replied message."
1178   :type 'string
1179   :group 'wl-draft
1180   :group 'wl-pref)
1181
1182 (defcustom wl-draft-reply-use-address-with-full-name t
1183   "*Use address with full-name in the draft of replied message."
1184   :type 'boolean
1185   :group 'wl-pref
1186   :group 'wl-draft)
1187
1188 (defcustom wl-subject-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*"
1189   "*Regexp matching \"Re: \" in the subject line."
1190   :type 'regexp
1191   :group 'wl-draft
1192   :group 'wl-pref)
1193
1194 (defcustom wl-folder-many-unsync-threshold 70
1195   "*Folders which contains messages more than this number are highlighted
1196 with wl-highlight-folder-many-face."
1197   :type 'integer
1198   :group 'wl-folder
1199   :group 'wl-pref)
1200
1201 (defcustom wl-fcc nil
1202   "*Folder Carbon Copy."
1203   :type '(choice (const :tag "disable" nil)
1204                  string)
1205   :group 'wl-draft
1206   :group 'wl-pref)
1207
1208 (defcustom wl-bcc nil
1209   "*Blind Carbon Copy."
1210   :type '(choice (const :tag "disable" nil)
1211                  string)
1212   :group 'wl-draft
1213   :group 'wl-pref)
1214
1215 (defcustom wl-folder-desktop-name "Desktop"
1216   "*An implicit name of the folder top entity."
1217   :type 'string
1218   :group 'wl-folder
1219   :group 'wl-pref)
1220
1221 (defcustom wl-summary-indent-length-limit 46
1222   "*Limit of indent length for thread."
1223   :type 'integer
1224   :group 'wl-summary
1225   :group 'wl-pref)
1226
1227 (defcustom wl-summary-no-from-message "nobody@nowhere?"
1228   "*A string displayed in summary when no from field exists."
1229   :type 'string
1230   :group 'wl-summary)
1231
1232 (defcustom wl-summary-no-subject-message "(WL:No Subject in original.)"
1233   "*A string displayed in summary when no subject field exists."
1234   :type 'string
1235   :group 'wl-summary)
1236
1237 (defcustom wl-summary-cancel-message "I'd like to cancel my message."
1238   "*The body content of a cancel message."
1239   :type 'string
1240   :group 'wl-summary)
1241
1242 (defcustom wl-summary-width 80
1243   "*Set summary line width if non nil."
1244   :type 'integer
1245   :group 'wl-summary
1246   :group 'wl-pref)
1247
1248 (defcustom wl-summary-pick-field-default "Body"
1249   "*Default field for pick."
1250   :type '(radio (const "From")
1251                 (const "Subject")
1252                 (const "To")
1253                 (const "Cc")
1254                 (const "Body")
1255                 (const "Since")
1256                 (const "Before")
1257                 (const "Last")
1258                 (const "First")
1259                 (string :tag "Other"))
1260   :group 'wl-summary)
1261
1262 (defcustom wl-from-width 17
1263   "*From width in summary."
1264   :type 'integer
1265   :group 'wl-summary
1266   :group 'wl-pref)
1267
1268 (defcustom wl-subject-length-limit 35
1269   "*Subject width in summary."
1270   :type 'integer
1271   :group 'wl-summary
1272   :group 'wl-pref)
1273
1274 (defcustom wl-mime-charset (if wl-on-nemacs
1275                                'iso-2022-jp
1276                              'x-ctext)
1277   "*MIME Charset for summary and message."
1278   :type 'symbol
1279   :group 'wl-summary
1280   :group 'wl-pref)
1281
1282 (defcustom wl-generate-mailer-string-func 'wl-generate-user-agent-string
1283   "A function to create X-Mailer field string ."
1284   :type 'function
1285   :group 'wl-draft)
1286
1287 (defcustom wl-highlight-background-mode  (if (boundp 'hilit-background-mode)
1288                                              (or hilit-background-mode 'dark)
1289                                            'dark)
1290   "*Background mode of highlight (for Old Emacsen).  'dark or 'light."
1291   :type '(radio (const dark)
1292                 (const light))
1293   :group 'wl-highlight)
1294
1295 (defcustom wl-highlight-x-face-func nil
1296   "A function to display X-Face."
1297   :type 'function
1298   :group 'wl-highlight)
1299
1300 (defcustom wl-qmail-inject-program "/var/qmail/bin/qmail-inject"
1301   "Location of the qmail-inject program."
1302   :type '(string :tag "Program")
1303   :group 'wl-draft)
1304
1305 (defcustom wl-qmail-inject-args nil
1306   "Arguments passed to qmail-inject programs.
1307 This should be a list of strings, one string for each argument.
1308
1309 For e.g., if you wish to set the envelope sender address so that bounces
1310 go to the right place or to deal with listserv's usage of that address, you
1311 might set this variable to '(\"-f\" \"you@some.where\")."
1312   :type '(repeat (string :tag "Argument"))
1313   :group 'wl-draft)
1314
1315 (defcustom wl-rejected-letter-start
1316   "^[\t ]*-+[\t ]+\\(original\\|\\(\\(the \\)?unsent\\)\\) message\\( follows\\)?[\t ]+-+[\t ]*$"
1317   "Regexp specifying the beginning of the wrapper around a returned letter.
1318 This wrapper is generated by the mail system when rejecting a letter."
1319   :type 'regexp
1320   :group 'wl-draft)
1321
1322 (defcustom wl-ignored-forwarded-headers "\\(received\\|return-path\\|x-uidl\\)"
1323   "*All headers that match this regexp will be deleted when forwarding a message."
1324   :type 'regexp
1325   :group 'wl-draft)
1326
1327 (defcustom wl-ignored-resent-headers "\\(return-receipt\\|[bdf]cc\\)"
1328   "*All headers that match this regexp will be deleted when resending a message."
1329   :type 'regexp
1330   :group 'wl-draft)
1331
1332 (defcustom wl-refile-default-from-folder "+from"
1333   "*Folder name to refile by `wl-refile-guess-by-from'."
1334   :type '(string :tag "Folder")
1335   :group 'wl-pref)
1336
1337 (defcustom wl-summary-auto-refile-skip-marks
1338   (list wl-summary-new-mark
1339         wl-summary-unread-uncached-mark
1340         wl-summary-unread-cached-mark)
1341   "Persistent marks to skip auto-refiling."
1342   :type '(repeat (string :tag "Mark"))
1343   :group 'wl-summary)
1344
1345 (defcustom wl-summary-reserve-mark-list
1346   (list "o" "O" "D")
1347   "If a message is already marked as temporal marks in this list,
1348 the message is not marked by any mark command."
1349   :type '(repeat (string :tag "Temp-Mark"))
1350   :group 'wl-summary)
1351
1352 (defcustom wl-summary-skip-mark-list
1353   (list "D")
1354   "If a message is already marked as temporal marks in this list,
1355 the message is skipped at cursor move."
1356   :type '(repeat (string :tag "Temp-Mark"))
1357   :group 'wl-summary)
1358
1359 (defcustom wl-summary-incorporate-marks
1360   (list wl-summary-new-mark
1361         wl-summary-unread-uncached-mark)
1362   "Persistent marks to prefetch at `wl-summary-incorporate'."
1363   :type '(repeat (string :tag "Mark"))
1364   :group 'wl-summary)
1365
1366 (defcustom wl-refile-rule-alist nil
1367   "Refile rule alist.
1368 e.x.
1369 '(
1370   (\"From\"
1371    (\"teranisi@isl.ntt.co.jp\" . \"+teranisi\"))
1372   (\"x-ml-name\"
1373    (\"^Wanderlust\"    . \"+wl\")
1374    (\"^Elips\" . \"+elips\")))"
1375   :type '(repeat (list (string :tag "Field")
1376                        (repeat :inline t
1377                                (cons (regexp :tag "Value")
1378                                      (string :tag "Folder")))))
1379   :group 'wl-pref)
1380
1381 (defcustom wl-strict-diff-folders nil
1382   "List of regexps matching folders of which Wanderlust seriously counts unsync messages."
1383   :type '(choice (const :tag "Off" nil)
1384                  (repeat (regexp :tag "Folder Regexp")))
1385   :group 'wl-folder)
1386
1387 (defcustom wl-folder-use-server-diff t
1388   "Checked unread message number on IMAP4 server.
1389 Only IMAP4 folders have an effect."
1390   :type 'boolean
1391   :group 'wl-folder)
1392
1393 (defcustom wl-force-fetch-folders nil
1394   "Non-nil forces to fetch subfolders when user opened an 'access' folder."
1395   :type '(choice (const :tag "off" nil)
1396                  (const :menu-tag "on" t)
1397                  (repeat (regexp :tag "Folder Regexp")))
1398   :group 'wl-folder)
1399
1400 (defcustom wl-auto-check-folder-name nil
1401   "*The folder specified by this variable will be automatically checked
1402 at start time."
1403   :type '(choice (string :tag "Folder")
1404                  (repeat (string :tag "Folder"))
1405                  (const none))
1406   :group 'wl-folder)
1407
1408 (defcustom wl-auto-uncheck-folder-list '("\\$.*")
1409   "All folders that match this list won't be checked when group is
1410 automatically checked (or desktop is checked).
1411 This value is preceded by wl-auto-check-folder-list.
1412 Each elements are regexp of folder name."
1413   :type '(repeat (regexp :tag "Folder Regexp"))
1414   :group 'wl-folder)
1415
1416 (defcustom wl-auto-check-folder-list nil
1417   "All folders that match this list are checked when group is
1418 automatically checked (or desktop is checked).
1419 This value precedes wl-auto-uncheck-folder-list.
1420 Each elements are regexp of folder name."
1421   :type '(repeat (regexp :tag "Folder Regexp"))
1422   :group 'wl-folder)
1423
1424 (defcustom wl-show-plug-status-on-modeline t
1425   "If it is non-nil, show plugged status in modeline."
1426   :type 'boolean
1427   :group 'wl-highlight)
1428
1429 (defcustom wl-plug-state-indicator-on  " [ON] "
1430   "String used to show plugged status ON."
1431   :type 'string
1432   :group 'wl-highlight)
1433
1434 (defcustom wl-plug-state-indicator-off " [--] "
1435   "String used to show plugged status OFF."
1436   :type 'string
1437   :group 'wl-highlight)
1438
1439 (defcustom wl-biff-check-folder-list nil
1440   "All folders that match this list are automatically checked
1441 every intervals specified by wl-biff-check-interval."
1442   :type '(repeat (regexp :tag "Folder Regexp"))
1443   :group 'wl-highlight)
1444
1445 (defcustom wl-biff-check-interval 40
1446   "Number of seconds between updates of new mails in the mode line."
1447   :type 'integer
1448   :group 'wl-highlight)
1449
1450 (defcustom wl-biff-state-indicator-on (if (and (featurep 'xemacs)
1451                                                (not (featurep 'mule)))
1452                                           "[Mail]"
1453                                         (decode-coding-string
1454                                          (read "\"[\e$B\\\")\e(B]\"")
1455                                          'iso-2022-jp)) ; Youbin mark
1456   "String used to show biff status ON."
1457   :type 'string
1458   :group 'wl-highlight)
1459
1460 (defcustom wl-biff-state-indicator-off "[\e$B!>\e(B]"
1461   "String used to show biff status OFF."
1462   :type 'string
1463   :group 'wl-highlight)
1464
1465 (defcustom wl-mode-line-display-priority-list '(biff plug title)
1466   "Displaying order of items to be shown in modeline.  The first item will
1467 be placed in the leftmost.  The significant items are `biff' and `plug';
1468 otherwise, e.g. `title', corresponds to the things except for the biff
1469 staus nor the plugged status.  The default order is '(biff plug title)
1470 even if the value of this option is set to nil.  Here are some samples:
1471
1472 ;; Plugged status first:
1473 \(setq wl-mode-line-display-priority-list '(plug))
1474
1475 ;; Biff status, Title of Wanderlust, Plugged status:
1476 \(setq wl-mode-line-display-priority-list '(biff title plug))
1477
1478 "
1479   :type '(repeat (radio (const :format "%v " biff)
1480                         (const :format "%v " plug)
1481                         (sexp :tag "Other" :value title)))
1482   :group 'wl-highlight)
1483
1484 (defcustom wl-interactive-send nil
1485   "*If non-nil, require your confirmation when sending draft message."
1486   :type 'boolean
1487   :group 'wl-pref)
1488
1489 (defcustom wl-interactive-exit t
1490   "*If non-nil, require your confirmation when exiting WL."
1491   :type 'boolean
1492   :group 'wl-pref)
1493
1494 (defcustom wl-summary-move-order 'unread
1495   "*The order of priority when move in summary mode.
1496 If this variable is `unread', precede \"U\", \"!\", \"N\" mark.
1497 If this variable is `new', precede \"N\" mark."
1498   :type '(radio (const new)
1499                 (const unread))
1500   :group 'wl-summary)
1501
1502 (defvar wl-summary-move-direction-downward t)
1503
1504 (defcustom wl-summary-move-direction-toggle t
1505   "*If non-nil, search direction for the next message will be determined
1506 depends on previous search direction.
1507 It uses wl-summary-move-direction-downward as a direction flag."
1508   :type 'boolean
1509   :group 'wl-summary)
1510
1511 (defcustom wl-auto-select-first nil
1512   "*If non-nil, display selected first message when enter summary."
1513   :type 'boolean
1514   :group 'wl-pref)
1515
1516 (defcustom wl-auto-select-next nil
1517   "*If non-nil, offer to go to the next folder from the end of the previous.
1518 If the value is the symbol `unread', go to the next folder
1519 that no unread message exists.  If the value is the symbol `skip-no-unread',
1520 skip the folder that no unread message exists.
1521
1522 See also variable `wl-summary-next-no-unread-command'."
1523   :type '(radio (const :tag "off" nil)
1524                 (const :tag "on" t)
1525                 (const unread)
1526                 (const skip-no-unread))
1527   :group 'wl-pref)
1528
1529 (defcustom wl-cache-prefetch-folder-type-list '(imap4 nntp)
1530   "*All folder types that match this list prefetch next message,
1531 and reserved buffer cache."
1532   :type '(set (const localdir)
1533               (const localnews)
1534               (const imap4)
1535               (const nntp)
1536               (const pop3)
1537               (const archive)
1538               (const internal))
1539   :group 'wl-pref)
1540
1541 (defcustom wl-cache-prefetch-folder-list nil
1542   "*All folders that match this list prefetch next message,
1543 and reserved buffer cache.
1544 e.x.
1545 '(\"^[-%]\")"
1546   :type '(repeat (regexp :tag "Folder Regexp"))
1547   :group 'wl-pref)
1548
1549 (defcustom wl-cache-prefetch-get-next-func 'wl-summary-default-get-next-msg
1550   "*A function to get message number when prefetch next message."
1551   :type 'function
1552   :group 'wl-pref)
1553
1554 ;; obsolete
1555 ;(defvar wl-no-cache-folder-list '("^\\$.*")
1556 ;  "All folders that match this list won't be cached when reading messages.
1557 ;Each elements are regexp of folder name.")
1558
1559 (defcustom wl-summary-always-sticky-folder-list nil
1560   "All folders that match this list has sticky summary.
1561 Each elements are regexp of folder name."
1562   :type '(radio (const :tag "none" nil)
1563                 (const :tag "all" t)
1564                 (repeat (regexp :tag "Folder Regexp")))
1565   :group 'wl-pref)
1566
1567 (defcustom wl-no-save-folder-list '("^/.*$")
1568   "All folders that match this list won't save its msgdb.
1569 Each elements are regexp of folder name."
1570   :type '(repeat (regexp :tag "Folder Regexp"))
1571   :group 'wl-pref)
1572
1573 (defcustom wl-save-folder-list nil
1574   "All folders that match this list save its msgdb.
1575 Each elements are regexp of folder name."
1576   :type '(repeat (regexp :tag "Folder Regexp"))
1577   :group 'wl-pref)
1578
1579 (defcustom wl-folder-mime-charset-alist
1580   '(("^-alt\\.chinese" . big5)
1581     ("^-relcom\\." . koi8-r)
1582     ("^-tw\\." . big5)
1583     ("^-han\\." . euc-kr))
1584   "Charset alist.  If no match, `wl-mime-charset' is used."
1585   :type '(repeat (cons (regexp :tag "Folder Regexp") (symbol :tag "Charset")))
1586   :group 'wl-summary
1587   :group 'wl-pref)
1588
1589 (defcustom wl-folder-weekday-name-lang-alist
1590   '(("^-alt\\.chinese" . "en")
1591     ("^-relcom\\." . "en")
1592     ("^-tw\\." . "en")
1593     ("^-han\\." . "en"))
1594   "Weekday name lang alist.
1595 If no match, `wl-summary-weekday-name-lang' is used.
1596 e.x.
1597 '((\"xemacs-beta$\" . \"en\")
1598   (\"^-fj\" . \"ja\"))"
1599   :type '(repeat (cons (regexp :tag "Folder Regexp")
1600                        (choice (const "ja")
1601                                (const "en")
1602                                (const "fr")
1603                                (const "de")
1604                                (string :tag "Other"))))
1605   :group 'wl-pref)
1606
1607 (defcustom wl-folder-thread-indent-set-alist
1608   '(("^-alt\\.chinese" . (2 "+" "+" "|" "-" " "))
1609     ("^-relcom\\." . (2 "+" "+" "|" "-" " "))
1610     ("^-tw\\." . (2 "+" "+" "|" "-" " "))
1611     ("^-han\\." . (2 "+" "+" "|" "-" " ")))
1612   "Thread indent set alist.
1613 If no match, following indent set is used.
1614 (wl-thread-indent-level
1615  wl-thread-have-younger-brother-str
1616  wl-thread-youngest-child-str
1617  wl-thread-vertical-str
1618  wl-thread-horizontal-str
1619  wl-thread-space-str)
1620 e.x.
1621 '((\"xemacs-beta$\" . (2 \"+\" \"+\" \"|\" \"-\" \" \")))"
1622   :type '(repeat (cons (regexp :tag "Folder Regexp")
1623                        (group (integer :tag "Indent")
1624                               (string :tag "Yonger Brother")
1625                               (string :tag "Yonger Child")
1626                               (string :tag "Vertical")
1627                               (string :tag "Horizontal")
1628                               (string :tag "Space"))))
1629   :group 'wl-pref)
1630
1631 (defcustom wl-folder-sync-range-alist
1632   (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
1633                       (regexp-quote wl-queue-folder) "$")
1634               "all"))
1635   "*Default sync range alist.  If no matches, `wl-default-sync-range' is used."
1636   :type '(repeat (cons (regexp :tag "Folder Regexp")
1637                        (choice (const "update")
1638                                (const "all")
1639                                (const "rescan")
1640                                (const "first:")
1641                                (const "last:")
1642                                (const "no-sync")
1643                                (const :tag "none" nil))))
1644   :group 'wl-pref)
1645
1646 (defcustom wl-default-sync-range  "update"
1647   "*Default sync range."
1648   :type '(choice (const "update")
1649                  (const "all")
1650                  (const "rescan")
1651                  (const "first:")
1652                  (const "last:")
1653                  (const "no-sync")
1654                  (const :tag "none" nil))
1655   :group 'wl-pref)
1656
1657 (defcustom wl-ask-range t
1658   "*If non-nil, ask for a range for summary synchronization.
1659 If nil, always use default."
1660   :type 'boolean
1661   :group 'wl-pref)
1662
1663 (defcustom wl-folder-move-cur-folder nil
1664   "*Non-nil, move to current folder on folder-mode when goto folder."
1665   :type 'boolean
1666   :group 'wl-folder)
1667
1668 (defcustom wl-folder-check-async (not wl-on-nemacs)
1669   "*Check the folder asynchronous."
1670   :type 'boolean
1671   :group 'wl-folder)
1672
1673 (defcustom wl-folder-notify-deleted nil
1674   "*Non-nil, display negative number on folder-mode when message is deleted
1675 in folder. If the value is 'sync, msgdb would be synchronized."
1676   :type '(choice (const :tag "off" nil)
1677                  (const :tag "on" t)
1678                  (const sync))
1679   :group 'wl-folder)
1680
1681 (defcustom wl-summary-exit-next-move t
1682   "*Non-nil, move to next-unsync or next-entity when exit summary."
1683   :type 'boolean
1684   :group 'wl-summary)
1685
1686 (defcustom wl-summary-next-no-unread-command
1687   '(wl-summary-read wl-summary-down wl-summary-up)
1688   "*Command list available when the value of `wl-auto-select-next' is 'unread
1689 or 'skip-no-unread."
1690   :type '(repeat function)
1691   :group 'wl-summary)
1692
1693 (defcustom wl-summary-search-via-nntp 'confirm
1694   "*Non-nil, search message via nntp after `wl-summary-jump-to-msg-by-message-id'.  If the value is 'confirm, confirm before search."
1695   :type 'boolean
1696   :group 'wl-summary)
1697
1698 (defcustom wl-summary-keep-cursor-command
1699   '(wl-summary-goto-folder wl-summary-goto-last-visited-folder)
1700   "*Command list to keep cursor position when folder is changed to
1701 already existing summary."
1702   :type '(repeat function)
1703   :group 'wl-summary)
1704
1705 (defcustom wl-summary-showto-folder-regexp nil
1706   "Regexp specifying the folder that shows the To (or Newsgroups) field as
1707 Sender information in summary mode."
1708   :type '(choice (const :tag "none" nil)
1709                  regexp)
1710   :group 'wl-summary)
1711
1712 (defcustom wl-folder-removed-mark "#<removed>"
1713   "Mark for removed folder."
1714   :type 'string
1715   :group 'wl-folder)
1716
1717 (defcustom wl-folder-unsubscribe-mark "#"
1718   "Mark for unsubscribe folder."
1719   :type 'string
1720   :group 'wl-folder)
1721
1722 (defcustom wl-delete-folder-alist '(("^-" . remove))
1723   "*Alist of folder and delete policy.
1724 Each element is (folder-regexp . policy).
1725
1726 The policy is one of the followings:
1727 'remove or
1728 'null     : remove message.
1729 string    : refile to the specified folder.
1730 'trash or
1731 otherwise : refile to the `wl-trash-folder'.
1732 ex.
1733 '((\"^%\" . \"%#mh/trash\")
1734   (\"^-\" . remove)
1735   (\"^\\\\+\" . trash))"
1736   :type '(repeat (cons (regexp :tag "Folder Regexp")
1737                        (choice :tag "Policy"
1738                                (const remove)
1739                                (const :tag "remove(null)" null)
1740                                (const trash)
1741                                (const :tag "trash(other)" trash)
1742                                (string :tag "Folder"))))
1743   :group 'wl-folder)
1744
1745 (defcustom wl-refile-policy-alist '(("^[-=']" . copy)
1746                                     (".*" . move))
1747   "*List of refile policy.  Each element is (FOLDER-REGEXP . POLICY).
1748 POLICY is copy or move."
1749   :type '(repeat (cons (regexp :tag "Folder Regexp")
1750                        (choice (const copy)
1751                                (const move))))
1752   :group 'wl-summary
1753   :group 'wl-pref)
1754
1755 (defcustom wl-folder-hierarchy-access-folders '("-" "-alt")
1756   "*Access group folders to make hierarchy structure."
1757   :type '(repeat (string :tag "Folder"))
1758   :group 'wl-folder)
1759
1760 (defcustom wl-folder-init-load-access-folders nil
1761   "*Access group folders to load folder list on `wl-folder-init'.
1762 If this variable is non-nil,
1763 `wl-folder-init-no-load-access-folders' will be ignored."
1764   :type '(repeat (regexp :tag "Folder Regexp"))
1765   :group 'wl-folder)
1766
1767 (defcustom wl-folder-init-no-load-access-folders nil
1768   "*Access group folders to not load folder list on `wl-folder-init'.
1769 If `wl-folder-init-load-access-folders' is non-nil,
1770 this variable will be ignored."
1771   :type '(repeat (regexp :tag "Folder Regexp"))
1772   :group 'wl-folder)
1773
1774 (defcustom wl-folder-access-subscribe-alist nil
1775   "*Subscribe folders to fetching folder entries.
1776 Each element is (group-regexp (subscribe folder-regexp ...)).
1777 If subscribe is non-nil, subscribe when match folder-regexp.
1778 If subscribe is nil, unsubscribe when match folder-regexp.
1779
1780 ex.
1781 '((\"^-fj$\"   . (t   \"^-fj\\\\.\\\\(editor\\\\|mail\\\\|net\\\\|news\\\\)\"))
1782   (\"^-comp$\" . (t   \"^-comp\\\\.unix\" \"^-comp\\\\.sys\"))
1783   (\"^-$\"     . (nil \"^-alt\" \"^-rec\")))"
1784   :type '(repeat (cons (regexp :tag "Folder Regexp")
1785                        (list (boolean :tag "Subscribed")
1786                              (repeat :inline t
1787                                      (regexp :tag "Folder Regexp")))))
1788   :group 'wl-folder)
1789
1790 ;;; For Folder Manager
1791
1792 (defcustom wl-interactive-save-folders t
1793   "*Non-nil require your confirmation when save folders."
1794   :type 'boolean
1795   :group 'wl-folder)
1796
1797 (defcustom wl-fldmgr-make-backup t
1798   "*Non-nil make backup file when save folders."
1799   :type 'boolean
1800   :group 'wl-folder)
1801
1802 (defcustom wl-fldmgr-folders-indent "\t"
1803   "*Indent string for folders file."
1804   :type 'string
1805   :group 'wl-folder)
1806
1807 (defcustom wl-fldmgr-sort-func 'wl-fldmgr-sort-standard
1808   "*A function to sort folder."
1809   :type 'function
1810   :group 'wl-folder)
1811
1812 (defcustom wl-fldmgr-sort-group-first t
1813   "*Non-nil Group folder is first when sort."
1814   :type 'function
1815   :group 'wl-folder)
1816
1817 (defcustom wl-fldmgr-add-complete-with-current-folder-list nil
1818   "*If non-nil, completion for adding folder refers current folder list."
1819   :type 'boolean
1820   :group 'wl-folder)
1821
1822 (defcustom wl-fldmgr-make-filter-default "Body"
1823   "*Default filter key while making filter on Folder."
1824   :type '(radio (const "From")
1825                 (const "Subject")
1826                 (const "To")
1827                 (const "Cc")
1828                 (const "Body")
1829                 (const "Since")
1830                 (const "Before")
1831                 (const "Last")
1832                 (const "First")
1833                 (string :tag "Other"))
1834   :group 'wl-folder)
1835
1836 ;;; For Expire and Archive
1837
1838 (defcustom wl-expire-alist nil
1839   "Alist to decide a policy for expire.
1840 Each element is (folder-regexp (number or date) policy).
1841
1842 The policy is one of the followings:
1843 'remove  : remove messsage.
1844 'trash   : refile `wl-trash-folder'.
1845 string   : refile string folder.
1846 function : call function.
1847
1848 ex.
1849 '((\"^\\\\+ml/wl$\"             (number 500 510) wl-expire-archive-number1 t)
1850   (\"^\\\\+ml/\"                (number 300 305) wl-expire-archive-number2)
1851   (\"^\\\\+outbox$\"            (number 300) \"$outbox;lha\")
1852   (\"^\\\\(\\\\+tmp\\\\|\\\\+trash\\\\)$\"      (date 7) remove)
1853   (\"^\\\\+misc$\"              (date 14) trash))"
1854   :type '(repeat (choice (list :tag "No-match"
1855                                (regexp :tag "Folder Regexp")
1856                                (const nil))
1857                          (list :tag "Match"
1858                                (regexp :tag "Folder Regexp")
1859                                (list (radio :value number
1860                                             (const number)
1861                                             (const date))
1862                                      (list :inline t
1863                                            integer
1864                                            (repeat :inline t integer)))
1865                                (choice :tag "Policy"
1866                                        :value remove
1867                                        (const remove)
1868                                        (const trash)
1869                                        (string :tag "folder")
1870                                        function)
1871                                (repeat :inline t
1872                                        :tag "Arg for function"
1873                                        sexp))))
1874   :group 'wl-expire)
1875
1876 (defcustom wl-archive-alist '((".*" wl-archive-number1))
1877   "Alist to decide a policy for archive.
1878 Each element is (folder-regexp policy(function)).
1879
1880 ex.
1881 '((\"\\\\+work$\" wl-archive-date)
1882   (\"\\\\+ml/\"   wl-archive-number1)
1883   (\".*\"       wl-archive-number2))"
1884   :type '(repeat (list (regexp :tag "Folder Regexp")
1885                        function
1886                        (repeat :inline t
1887                                (sexp :tag "Argument"))))
1888   :group 'wl-expire)
1889
1890 (defcustom wl-summary-expire-reserve-marks
1891   (list wl-summary-important-mark
1892         wl-summary-new-mark
1893         wl-summary-unread-mark
1894         wl-summary-unread-uncached-mark
1895         wl-summary-unread-cached-mark)
1896   "Permanent marks of reserved message when expire.
1897 Don't reserve temporary mark message.
1898
1899 ex.
1900 'all  : reserved all permanent marks.
1901 'none : not reserve permanent marks.
1902 list  : reserved specified permanent marks."
1903   :type '(repeat (string :tag "Mark"))
1904   :group 'wl-expire)
1905
1906 (defcustom wl-expire-number-with-reserve-marks nil
1907   "If non-nil, include reserve message when expire by number."
1908   :type 'boolean
1909   :group 'wl-expire)
1910
1911 (defcustom wl-expire-add-seen-list t
1912   "*If non-nil, add seen message list when refile message at expire."
1913   :type 'boolean
1914   :group 'wl-expire)
1915
1916 (defcustom wl-expire-use-log nil
1917   "*If non-nil, write a log when expired."
1918   :type 'boolean
1919   :group 'wl-expire)
1920
1921 (defcustom wl-expire-folder-update-msgdb t
1922   "*Non-nil update summary msgdb when expire on folder mode."
1923   :type 'boolean
1924   :group 'wl-expire)
1925
1926 ;; for wl-expire-archive-{number1|number2}
1927 (defcustom wl-expire-archive-files 100
1928   "*The number of one archive folder."
1929   :type 'integer
1930   :group 'wl-expire)
1931
1932 ;; for wl-expire-archive-{number1|number2|date}
1933 (defcustom wl-expire-archive-get-folder-func
1934   'wl-expire-archive-get-folder
1935   "*A function to get archive folder name."
1936   :type 'function
1937   :group 'wl-expire)
1938
1939 (defcustom wl-expire-delete-oldmsg-confirm t
1940   "*If non-nil, require your confirmation when delete old message."
1941   :type 'boolean
1942   :group 'wl-expire)
1943
1944 ;; for wl-expire-archive-get-folder
1945 (defcustom wl-expire-archive-folder-type 'zip
1946   "*Archiver type of archive folder."
1947   :type '(radio (const zip)
1948                 (const lha)
1949                 (const zoo)
1950                 (const rar)
1951                 (const tar)
1952                 (const tgz)
1953                 (symbol :tag "Other"))
1954   :group 'wl-expire)
1955
1956 (defcustom wl-expire-archive-folder-name-fmt "%s-%%05d;%s" ;; $folder-00100;zip
1957   "*A format string for archive folder name."
1958   :type 'string
1959   :group 'wl-expire)
1960
1961 (defcustom wl-expire-archive-folder-num-regexp "-\\([0-9]+\\);"
1962   "*A regexp string for archive folder name."
1963   :type 'string
1964   :group 'wl-expire)
1965
1966 (defcustom wl-expire-archive-date-folder-name-fmt "%s-%%04d%%02d;%s"
1967                                                 ;; $folder-199812;zip
1968   "*A format string for archive date folder name."
1969   :type 'string
1970   :group 'wl-expire)
1971
1972 (defcustom wl-expire-archive-date-folder-num-regexp "-\\([0-9]+\\);"
1973   "*A regexp string for archive date folder name."
1974   :type 'string
1975   :group 'wl-expire)
1976
1977 (defcustom wl-expire-archive-folder-prefix nil
1978   "*Prefix for archive folder."
1979   :type '(radio (const :tag "nothing" nil)
1980                 (const :tag "full" t)
1981                 (const short))
1982   :group 'wl-expire)
1983
1984 ;;;; Highlights.
1985
1986 ;; highilght about summary
1987 (defcustom wl-highlight-max-summary-lines 10000
1988   "*If the summary is larger than this lines, don't highlight it."
1989   :type 'integer
1990   :group 'wl-highlight)
1991
1992 ;; highilght about draft and message
1993 (defcustom wl-highlight-body-too t
1994   "*In addition to header, highlight the body too.  if non nil."
1995   :type 'boolean
1996   :group 'wl-highlight)
1997
1998 (defcustom wl-highlight-message-header-alist
1999   '(("Subject[ \t]*:" . wl-highlight-message-important-header-contents)
2000     ("From[ \t]*:\\|To[ \t]*:" . wl-highlight-message-important-header-contents2)
2001     ("X-[^ \t]*:\\|User-Agent[ \t]*:" . wl-highlight-message-unimportant-header-contents))
2002   ""
2003   :type '(repeat (cons regexp face))
2004   :group 'wl-highlight)
2005
2006 (defcustom wl-highlight-message-header-button-alist
2007   (` (("^\\(References\\|Message-Id\\|In-Reply-To\\):" "<[^>]+>"
2008        0 wl-message-button-refer-article  0)
2009       ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)"
2010        1 wl-message-button-refer-article 3)))
2011   "Alist of headers and regexps to match buttons in message headers."
2012   :type '(repeat
2013           (list (regexp :tag "Header")
2014                 regexp
2015                 (integer :tag "Button")
2016                 (function :tag "Callback")
2017                 (repeat :tag "Data"
2018                         :inline t
2019                         (integer :tag "Regexp group"))))
2020   :group 'wl-highlight)
2021
2022 (defcustom wl-highlight-citation-prefix-regexp
2023   "^[>|:} ]*[>|:}]\\([^ \n>]*>\\)?\\|^[^ <\n>]*>"
2024   "All lines that match this regexp will be highlighted with
2025  `wl-highlight-message-cited-text-*' face."
2026   :type 'regexp
2027   :group 'wl-highlight)
2028
2029 (defcustom wl-highlight-highlight-citation-too nil
2030   "*Whether the whole citation line should go in the
2031 `wl-highlight-citation-face' face.
2032 If nil, the text matched by `wl-highlight-citation-prefix-regexp' is in the
2033 default face, and the remainder of the line is in the
2034 wl-highlight-message-cited-text face."
2035   :type 'boolean
2036   :group 'wl-highlight)
2037
2038 (defcustom wl-highlight-force-citation-header-regexp
2039   "^>>>.*$\\|^[ \t]*<[^>]*>[ \t]*$"
2040   "*The pattern to match the prolog of a cited block.
2041 Text in the body of a message which matches this will be displayed in
2042 the `wl-highlight-message-headers' face."
2043   :type 'regexp
2044   :group 'wl-highlight)
2045
2046 (defcustom wl-highlight-citation-header-regexp
2047   (concat "In article.*$\\|In message.*$\\|In the message.*$\\|"
2048           "^At[^\n]+\n[^\n]+wrote:\n\\|"
2049           "^.*\\(writes\\|wrote\\|said\\):\n")
2050   "*The pattern to match the prolog of a cited block.
2051 Text in the body of a message which matches this will be displayed in
2052 the `wl-highlight-message-headers' face."
2053   :type 'regexp
2054   :group 'wl-highlight)
2055
2056 (defcustom wl-highlight-max-header-size nil
2057   "*If the message header is larger than this many chars, don't highlight it.
2058 If this is nil, all headers will be highlighted."
2059   :type 'integer
2060   :group 'wl-highlight)
2061
2062 (defcustom wl-highlight-max-message-size 10000
2063   "*If the message body is larger than this many chars, don't highlight it.
2064 This is to prevent us from wasting time trying to fontify things like
2065 uuencoded files and large digests.  If this is nil, all messages will
2066 be highlighted."
2067   :type 'integer
2068   :group 'wl-highlight)
2069
2070 ;; highilght about signature (of draft and message)
2071 (defcustom wl-highlight-signature-separator
2072   '("\n--+\n" "\n\n--+.*\n*\\'")
2073   "List of regexps matching signature separator.
2074 It will be verified from head to tail looking for a separator.
2075 Verification will be done from the end of the buffer.
2076 No need to specify \"^-- $\" in this list,
2077 because it is verified by default.
2078 This variable can also be a regex."
2079   :type '(repeat regexp)
2080   :group 'wl-highlight)
2081
2082 (defcustom wl-max-signature-size 400
2083   "*If the signature is larger than this chars, don't treat it as a signature."
2084   :type 'integer
2085   :group 'wl-highlight)
2086
2087 ;; highilght about mouse
2088 (defcustom wl-use-highlight-mouse-line (and window-system
2089                                             (>= emacs-major-version 19))
2090   "*Highlight mouse line, if non nil."
2091   :type 'boolean
2092   :group 'wl-highlight)
2093
2094 ;; highilght about folder
2095 (defcustom wl-highlight-folder-with-icon
2096   (or (and (featurep 'xemacs)
2097            (featurep 'xpm))
2098       wl-on-emacs21)
2099   "*Highlight folder with icon(XEmacs or Emacs 21)."
2100   :type 'boolean
2101   :group 'wl-highlight)
2102 (defcustom wl-highlight-folder-by-numbers t
2103   "Highlight folder lines by numbers.
2104 If it is a number, only numbers will be highlighted."
2105   :type '(choice (const :tag "whole line" t)
2106                  (const :tag "only numbers" 1)
2107                  (const :tag "don't highlight" nil))
2108   :group 'wl-highlight)
2109
2110 (defcustom wl-highlight-signature-search-func 'wl-highlight-signature-search
2111   "Function to search signature area in the message body."
2112   :type 'function
2113   :group 'wl-highlight)
2114
2115 (defcustom wl-use-dnd (and wl-on-xemacs
2116                            (featurep 'dragdrop))
2117   "If Non-nil, support dragdrop feature in XEmacs."
2118   :type 'boolean
2119   :group 'wl-pref)
2120
2121 (defcustom wl-reset-plugged-alist t
2122   "*If non-nil, reset `elmo-plugged-alist' when startup."
2123   :type 'boolean
2124   :group 'wl-pref)
2125
2126 (defcustom wl-demo-display-logo (if (or (featurep 'xemacs)
2127                                         (module-installed-p 'image)
2128                                         (module-installed-p 'bitmap))
2129                                     t)
2130   "If it is T, show graphic logo in the startup screen.  You can set it to
2131 a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
2132   :type '(radio (const :tag "Off" nil)
2133                 (const :tag "On (any format)" t)
2134                 (const xpm)
2135                 (const xbm)
2136                 (const :tag "bitmap (using BITMAP-MULE)" bitmap))
2137   :group 'wl-pref)
2138
2139 ;;; Internal variables
2140 (defvar wl-init nil)
2141
2142 ;; For disconnected operations.
2143 (defvar wl-plugged-hook nil)
2144 (defvar wl-unplugged-hook nil)
2145 (defvar wl-plugged t)
2146
2147 ;; Internal variables used to modeline identifiers.
2148 (defvar wl-modeline-plug-status nil)
2149 (defvar wl-modeline-plug-state-on wl-plug-state-indicator-on)
2150 (defvar wl-modeline-plug-state-off wl-plug-state-indicator-off)
2151 (defvar wl-modeline-biff-status nil)
2152 (defvar wl-modeline-biff-state-on wl-biff-state-indicator-on)
2153 (defvar wl-modeline-biff-state-off wl-biff-state-indicator-off)
2154
2155 ;; Advanced thread view.
2156 (defvar wl-thread-indent-level 1
2157   "*Indent level for thread.")
2158 (defvar wl-thread-have-younger-brother-str "\e$B(2\e(B"
2159   "*A string for thread branch line.  It should contain one character.")
2160 (defvar wl-thread-youngest-child-str       "\e$B(1\e(B"
2161   "*A string for thread branch line.  It should contain one character.")
2162 (defvar wl-thread-vertical-str             "\e$B(-\e(B"
2163   "*A string for thread branch line.  It should contain one character.")
2164 (defvar wl-thread-horizontal-str           "\e$B(,\e(B"
2165   "*A string for thread branch line.  It should contain one character.")
2166 (defvar wl-thread-space-str                "\e$B!!\e(B"
2167   "*A string for thread branch line.  It should contain one character.")
2168
2169 (defvar wl-highlight-thread-indent-string-regexp "[^[<]*"
2170   "* A regexp string for thread indent...for highlight.")
2171
2172 ;; folder icons. filename relative to wl-icon-dir
2173 (defvar wl-opened-group-folder-icon "opened.xpm"
2174   "*Icon file for opened group folder.")
2175 (defvar wl-closed-group-folder-icon "closed.xpm"
2176   "*Icon file for closed group folder.")
2177 (defvar wl-nntp-folder-icon "news.xpm"
2178   "*Icon file for nntp folder.")
2179 (defvar wl-imap-folder-icon "imap.xpm"
2180   "*Icon file for imap folder.")
2181 (defvar wl-pop-folder-icon  "pop.xpm"
2182   "*Icon file for pop folder.")
2183 (defvar wl-localdir-folder-icon "local.xpm"
2184   "*Icon file for localdir folder.")
2185 (defvar wl-localnews-folder-icon "localnews.xpm"
2186   "*Icon file for localnews folder.")
2187 (defvar wl-internal-folder-icon "internal.xpm"
2188   "*Icon file for internal folder.")
2189 (defvar wl-multi-folder-icon "multi.xpm"
2190   "*Icon file for multi folder.")
2191 (defvar wl-filter-folder-icon "filter.xpm"
2192   "*Icon file for filter folder.")
2193 (defvar wl-archive-folder-icon "archive.xpm"
2194   "*Icon file for archive folder.")
2195 (defvar wl-pipe-folder-icon "pipe.xpm"
2196   "*Icon file for pipe folder.")
2197 (defvar wl-maildir-folder-icon "maildir.xpm"
2198   "*Icon file for maildir folder.")
2199 (defvar wl-empty-trash-folder-icon "trash-e.xpm"
2200   "*Icon file for emptied trash folder.")
2201 (defvar wl-trash-folder-icon "trash.xpm"
2202   "*Icon file for trash folder.")
2203 (defvar wl-draft-folder-icon "draft.xpm"
2204   "*Icon file for draft folder.")
2205 (defvar wl-queue-folder-icon "queue.xpm"
2206   "*Icon file for queue folder.")
2207 (defvar wl-plugged-icon "plugged.xpm"
2208   "*Icon file for plugged state.")
2209 (defvar wl-unplugged-icon "unplugged.xpm"
2210   "*Icon file for unplugged state.")
2211 (defvar wl-biff-mail-icon "letter.xpm"
2212   "*Icon file for mail existed state.")
2213 (defvar wl-biff-nomail-icon "no-letter.xpm"
2214   "*Icon file for no mail existed state.")
2215 (defvar wl-prog-uudecode "uudecode"
2216   "*uudecode program name.")
2217 (defvar wl-prog-uudecode-arg nil
2218   "*Arguments for uudecode program.")
2219 (defvar wl-prog-uudecode-no-stdout-option t
2220   "*If non-nil, uudecode program don't have option for output to stdout.")
2221
2222 ;; Obsolete variables. for compatibility.
2223 (defvar wl-address-filename wl-address-file)
2224 (make-obsolete-variable 'wl-address-filename 'wl-address-file)
2225 (defvar wl-score-default-file-name wl-score-default-file)
2226 (make-obsolete-variable 'wl-score-default-file-name 'wl-score-default-file)
2227 (defvar wl-draft-prepared-config-alist nil)
2228 (make-obsolete-variable 'wl-draft-prepared-config-alist 'wl-draft-config-alist)
2229 (defvar wl-score-files-directory wl-score-files-dir)
2230 (make-obsolete-variable 'wl-score-files-directory 'wl-score-files-dir)
2231 (defvar wl-summary-temp-above wl-summary-target-above)
2232 (make-obsolete-variable 'wl-summary-temp-above 'wl-summary-target-above)
2233
2234 ;; plug
2235 (defvar wl-plugged-plug-on "ON")
2236 (defvar wl-plugged-plug-off "--")
2237 (defvar wl-plugged-auto-off "**")
2238 (defvar wl-plugged-server-indent 2)
2239 (defvar wl-plugged-port-indent 4)
2240 (defvar wl-plugged-queue-status-column 25)
2241
2242 (require 'product)
2243 (product-provide (provide 'wl-vars) (require 'wl-version))
2244
2245 ;;; wl-vars.el ends here