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