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