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