* wl-vars.el (wl-folder-use-frame): New user option.
[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-func '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-func 'wl-summary-default-subject
172   "*A function for displaying subject."
173   :type 'function
174   :group 'wl-summary)
175
176 (defcustom wl-summary-subject-filter-func '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-default-pop3-user' is used.
305 To use POP-before-SMTP,
306 (setq wl-draft-send-mail-func '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-default-pop3-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-default-pop3-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-default-pop3-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-default-pop3-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-default-nntp-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-default-nntp-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-default-nntp-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-default-nntp-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
512 (defvar wl-plugged-exit-hook nil
513   "A hook called when exit plugged mode.")
514
515 ;;;; functions for draft
516 (defcustom wl-draft-send-func 'wl-draft-normal-send-func
517   "A function to send message."
518   :type 'function
519   :group 'wl-draft)
520
521 (defcustom wl-draft-send-news-func 'wl-draft-elmo-nntp-send
522   "A function to send news."
523   :type 'function
524   :group 'wl-draft)
525
526 (defcustom wl-draft-send-mail-func 'wl-draft-send-mail-with-smtp
527   "A function to send mail.
528 Prepared candidates are 'wl-draft-send-mail-with-smtp,
529 'wl-draft-send-mail-with-qmail and 'wl-draft-send-mail-with-pop-before-smtp."
530   :type '(radio (function-item wl-draft-send-mail-with-smtp)
531                 (function-item wl-draft-send-mail-with-qmail)
532                 (function-item wl-draft-send-mail-with-pop-before-smtp)
533                 (function :tag "Other"))
534   :group 'wl-draft)
535
536 (defcustom wl-draft-reply-with-argument-list
537   '(("Reply-To" . (("Reply-To") nil nil))
538     ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
539     ("From" . (("From") nil nil)))
540   "Alist of cons cell of
541 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
542 'field-name' is a string.
543 'fields for ***' is a list of strings.
544 If car of each cons cell exists in original message,
545 cdr of each cons cell is used for draft message.
546 Default is for 'reply-to-author'."
547   :type '(repeat (cons (choice (string :tag "Field Name")
548                                (repeat (string :tag "Field Name")))
549                        (list (repeat :tag "Fields For To" string)
550                              (repeat :tag "Fields For Cc" string)
551                              (repeat :tag "Fields For Newsgroups" string))))
552   :group 'wl-draft)
553
554 (defcustom wl-draft-reply-without-argument-list
555   '(("Followup-To" . (nil nil ("Followup-To")))
556     ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
557     ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups")))
558     ("From" . (("From") ("To" "Cc") ("Newsgroups"))))
559   "Alist of cons cell of
560 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
561 'field-name' is a string.
562 'fields for ***' is a list of strings.
563 If car of each cons cell exists in original message,
564 cdr of each cons cell is used for draft message.
565 Default is for 'reply-to-all'."
566   :type '(repeat (cons (choice (string :tag "Field Name")
567                                (repeat (string :tag "Field Name")))
568                        (list (repeat :tag "Fields For To" string)
569                              (repeat :tag "Fields For Cc" string)
570                              (repeat :tag "Fields For Newsgroups" string))))
571   :group 'wl-draft)
572
573 (defcustom wl-draft-reply-myself-with-argument-list
574   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
575     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
576     ("From" . (("To") ("Cc") nil)))
577   "Alist of cons cell of
578 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
579 'field-name' is a string.
580 'fields for ***' is a list of strings.
581 If car of each cons cell exists in original message,
582 cdr of each cons cell is used for draft message.
583 Default is for 'reply-to-me'."
584   :type '(repeat (cons (choice (string :tag "Field Name")
585                                (repeat (string :tag "Field Name")))
586                        (list (repeat :tag "Fields For To" string)
587                              (repeat :tag "Fields For Cc" string)
588                              (repeat :tag "Fields For Newsgroups" string))))
589   :group 'wl-draft)
590
591 (defcustom wl-draft-reply-myself-without-argument-list
592   '(("Followup-To" . (("To") ("Cc") ("Followup-To")))
593     ("Newsgroups" . (("To") ("Cc") ("Newsgroups")))
594     ("From" . (("To") ("Cc") nil)))
595   "Alist of cons cell of
596 ('field-name' .  ('fields for To' 'fields for Cc' 'fields for Newsgroups'))
597 'field-name' is a string.
598 'fields for ***' is a list of strings.
599 If car of each cons cell exists in original message,
600 cdr of each cons cell is used for draft message.
601 Default is for 'followup-to-me'."
602   :type '(repeat (cons (choice (string :tag "Field Name")
603                                (repeat (string :tag "Field Name")))
604                        (list (repeat :tag "Fields For To" string)
605                              (repeat :tag "Fields For Cc" string)
606                              (repeat :tag "Fields For Newsgroups" string))))
607   :group 'wl-draft)
608
609 (defcustom wl-draft-always-delete-myself nil
610   "*Always delete myself from reciepient if non-nil."
611   :type 'boolean
612   :group 'wl-draft)
613
614 (defcustom wl-draft-delete-myself-from-bcc-fcc nil
615   "*Do not insert bcc or fcc if To and Cc fields is a member of
616 `wl-subscribed-mailing-list'"
617   :type 'boolean
618   :group 'wl-draft)
619
620 (defcustom wl-draft-resume-folder-window t
621   "*Resume folder window in `wl-draft-hide'."
622   :type 'boolean
623   :group 'wl-draft)
624
625 (defcustom wl-draft-use-frame nil
626   "*Raise new frame when composing draft."
627   :type 'boolean
628   :group 'wl-draft)
629
630 (defcustom wl-draft-qmail-send-plugged nil
631   "*Send mail when plugged is on, in the `wl-draft-send-mail-with-qmail'."
632   :type 'boolean
633   :group 'wl-draft)
634
635 (defcustom wl-draft-remove-group-list-contents t
636   "*If non-nil, remove group list contents in `wl-draft-send-mail-with-smtp'."
637   :type 'boolean
638   :group 'wl-draft)
639
640 ;;;;
641 (defcustom wl-init-file "~/.wl"
642   "*User customization setting file."
643   :type 'file
644   :group 'wl)
645
646 (defcustom wl-folders-file "~/.folders"
647   "*Folders file."
648   :type 'file
649   :group 'wl)
650
651 (defcustom wl-address-file "~/.addresses"
652   "*Addresses file."
653   :type 'file
654   :group 'wl)
655
656 (defcustom wl-alias-file "~/.im/Aliases"
657   "*Alias file for completion."
658   :type 'file
659   :group 'wl)
660
661 (defcustom wl-ldap-server "localhost"
662   "*LDAP server."
663   :type '(string :tag "Server")
664   :group 'wl)
665
666 (defcustom wl-ldap-port nil
667   "*LDAP port."
668   :type '(choice (const :tag "Default port" nil)
669                  integer)
670   :group 'wl)
671
672 (defcustom wl-ldap-base "c=US"
673   "*LDAP base."
674   :type '(string :tag "Base")
675   :group 'wl)
676
677 (defcustom wl-use-ldap nil
678   "*If non-nil, use LDAP for address completion."
679   :type 'boolean
680   :group 'wl)
681
682 (defcustom wl-folder-info-save t
683   "If non-nil, save elmo-folder-info-alist."
684   :type 'boolean
685   :group 'wl-folder)
686
687 (defcustom wl-summary-unread-mark "!"
688   "Mark for unread message."
689   :type '(string :tag "Mark")
690   :group 'wl-summary-marks)
691 (defcustom wl-summary-important-mark "$"
692   "Mark for important message."
693   :type '(string :tag "Mark")
694   :group 'wl-summary-marks)
695 (defcustom wl-summary-new-mark "N"
696   "Mark for new message."
697   :type '(string :tag "Mark")
698   :group 'wl-summary-marks)
699 (defcustom wl-summary-unread-uncached-mark "U"
700   "Mark for unread and uncached message."
701   :type '(string :tag "Mark")
702   :group 'wl-summary-marks)
703 (defcustom wl-summary-unread-cached-mark "!"
704   "Mark for unread but already cached message."
705   :type '(string :tag "Mark")
706   :group 'wl-summary-marks)
707 (defcustom wl-summary-read-uncached-mark "u"
708   "Mark for read but uncached message."
709   :type '(string :tag "Mark")
710   :group 'wl-summary-marks)
711 (defcustom wl-summary-score-over-mark "+"
712   "Score mark used for messages with high scores."
713   :type '(string :tag "Mark")
714   :group 'wl-summary-marks)
715 (defcustom wl-summary-score-below-mark "-"
716   "Score mark used for messages with low scores."
717   :type '(string :tag "Mark")
718   :group 'wl-summary-marks)
719
720 (defcustom wl-summary-no-mime-folder-list
721   (list (concat "^" (regexp-quote wl-draft-folder) "$"))
722   "*All folders that match this list don't analysis mime."
723   :type '(repeat string)
724   :group 'wl-summary)
725
726 (defcustom wl-summary-fix-timezone "JST"
727   "Non-nil forces to fix timezone of summary date."
728   :type 'string
729   :group 'wl-summary)
730
731 (defcustom wl-summary-default-score 0
732   "*Default message score level.
733 All scores generated by the score files will be added to this score.
734 If this variable is nil, scoring will be disabled."
735   :type '(choice (const :tag "disable" nil)
736                  integer)
737   :group 'wl-score)
738
739 (defcustom wl-summary-important-above nil
740   "*Mark all messages with a score above this variable as important.
741 This variable is local to the summary buffers."
742   :type '(choice (const :tag "off" nil)
743                  integer)
744   :group 'wl-score)
745
746 (defcustom wl-summary-target-above nil
747   "*Mark all messages with a score above this variable as target.
748 This variable is local to the summary buffers."
749   :type '(choice (const :tag "off" nil)
750                  integer)
751   :group 'wl-score)
752
753 (defcustom wl-summary-mark-below 0
754   "*Mark all messages with a score below this variable as read.
755 This variable is local to each summary buffer and usually set by the
756 score file."
757   :type 'integer
758   :group 'wl-score)
759
760 (defcustom wl-summary-expunge-below nil
761   "All messages that have a score less than this variable will be expunged.
762 This variable is local to the summary buffers."
763   :type '(choice (const :tag "off" nil)
764                  integer)
765   :group 'wl-score)
766
767 (defcustom wl-summary-score-marks
768   (list wl-summary-new-mark)
769   "Persistent marks to scoring."
770   :type '(repeat (string :tag "Mark"))
771   :group 'wl-score)
772
773 (defcustom wl-use-scoring (not wl-on-nemacs)
774   "*If non-nil, enable scoring."
775   :type 'boolean
776   :group 'wl-pref)
777
778 (defcustom wl-summary-rescore-partial-threshold 200
779   "*Summary is not scored entirely if there are messages more than this value.
780 In sync-all or rescan."
781   :type 'integer
782   :group 'wl-score)
783
784 (defcustom wl-score-files-dir (concat elmo-msgdb-dir elmo-path-sep)
785   "*Name of the directory where score files will be stored.
786 (default \"~/.elmo\")."
787   :type 'directory
788   :group 'wl)
789
790 (defcustom wl-score-interactive-default-score 1000
791   "*Scoring commands will raise/lower the score with this number as the default."
792   :type 'integer
793   :group 'wl-score)
794
795 (defcustom wl-score-expiry-days 7
796   "*Number of days before unused score file entries are expired.
797 If this variable is nil, no score file entries will be expired."
798   :type '(choice (const :tag "never" nil)
799                  number)
800   :group 'wl-score)
801
802 (defcustom wl-score-update-entry-dates t
803   "*In non-nil, update matching score entry dates.
804 If this variable is nil, then score entries that provide matches
805 will be expired along with non-matching score entries."
806   :type 'boolean
807   :group 'wl-score)
808
809 (defcustom wl-score-folder-alist nil
810   "*Alist of folder regexp and score file."
811   :type '(repeat (list (regexp :tag "Folder Regexp")
812                        (repeat :inline t
813                                (choice file
814                                        (symbol :tag "Variable")))))
815   :group 'wl-score)
816
817 (defcustom wl-score-folder-alist-matchone t
818   "*If non-nil, getting only one element of `wl-score-folder-alist'."
819   :type 'boolean
820   :group 'wl-score)
821
822 (defcustom wl-score-default-file "all.SCORE"
823   "*Default score file name."
824   :type 'file
825   :group 'wl-score)
826
827 (defcustom wl-score-simplify-fuzzy-regexp
828   '("^[ \t]*\\[[^:]+[,: ][0-9]+\\][ \t]*")
829   "*Strings to be removed when doing fuzzy matches.
830 This can either be a regular expression or list of regular expressions."
831   :type '(repeat regexp)
832   :group 'wl-score)
833
834 (defcustom wl-score-header-default-entry
835   '(("number" -1000 perm =)
836     ("subject" -1000 nil nil)
837     ("from" -1000 perm s)
838     ("message-id" -1000 temp e)
839     ("references" -1000 perm e)
840     ("to" -1000 perm s)
841     ("cc" -1000 perm s)
842     ("date" -1000 temp nil)
843     ("xref" -1000 perm s)
844     ("extra" -1000 perm s)
845     ("chars" -1000 perm >)
846     ("lines" -1000 perm >)
847     ("followup" -1000 perm s)
848     ("thread" -1000 temp s))
849   "*Default entry when insert score entry."
850   :type '(repeat (list (string :tag "Header")
851                        (choice (integer :tag "Score")
852                                (const :tag "Ask" nil))
853                        (choice (const :tag "Permanent" perm)
854                                (const :tag "Temporary" temp)
855                                (const :tag "Ask" nil))
856                        (choice (const :tag "Regexp string" r)
857                                (const :tag "Substring" s)
858                                (const :tag "fuzzy string" f)
859                                (const :tag "Exact string" e)
860                                (const :tag "REGEXP STRING" R)
861                                (const :tag "SUBSTRING" S)
862                                (const :tag "FUZZY STRING" F)
863                                (const :tag "EXACT STRING" E)
864                                (const :tag "less than" <)
865                                (const :tag "less equal" <=)
866                                (const :tag "greater than" >)
867                                (const :tag "greater equal" >=)
868                                (const :tag "equal" =)
869                                (const :tag "Ask" nil))))
870   :group 'wl-score)
871
872 (defcustom wl-score-mode-mime-charset 'x-ctext
873   "*MIME Charset for score file."
874   :type 'symbol
875   :group 'wl-score)
876
877 (defcustom wl-draft-fields
878   '("To:" "Cc:" "Bcc:" "FCC:" "Distribution:" "Organization:"
879     "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:")
880   "Fields used in draft mode."
881   :type '(repeat (string :tag "Field"))
882   :group 'wl-draft)
883
884 (defcustom wl-draft-config-alist nil
885   "Alist of configuration field on draft.
886 ex.
887 '((\"^To: .*wl@lists.airs.net\"
888    (\"From\" . wl-from2)
889    (\"Organization\" . wl-organization2))
890   (\"^To: .*hogehoge@\"
891    (\"From\" . \"Anonymous <hogehoge@aaa.ne.jp>\")
892    wl-my-draft-config-func-hoge))"
893   :type '(repeat (list (sexp :tag "Match")
894                        (repeat
895                         :inline t
896                         (choice (cons (sexp :tag "Field(Variable)")
897                                       (sexp :tag "Value"))
898                                 (sexp :tag "Function")))))
899   :group 'wl-draft)
900
901 (defcustom wl-draft-config-matchone nil
902   "*If non-nil, applied only one element of `wl-draft-config-alist'."
903   :type 'boolean
904   :group 'wl-draft)
905
906 (defcustom wl-template-alist nil
907   "Alist of template."
908   :type '(repeat (list (string :tag "Name")
909                        (repeat
910                         :inline t
911                         (choice (cons (sexp :tag "Field(Variable)")
912                                       (sexp :tag "Value"))
913                                 (sexp :tag "Function")))))
914   :group 'wl-draft)
915
916 (defcustom wl-template-visible-select t
917   "*If non-nil, select template with visible."
918   :type 'boolean
919   :group 'wl-draft)
920
921 (defcustom wl-template-confirm nil
922   "*If non-nil, require your confirmation when selected template."
923   :type 'boolean
924   :group 'wl-draft)
925
926 (defcustom wl-template-buffer-lines 7
927   "*Lines of template buffer."
928   :type 'integer
929   :group 'wl-draft)
930
931 ;; queued sending.
932 (defcustom wl-draft-enable-queuing t
933   "*Non-nil enables queued sending."
934   :type 'boolean
935   :group 'wl-draft
936   :group 'wl-pref)
937
938 (defcustom wl-draft-use-cache nil
939   "*If non-nil, sending message is cached."
940   :type 'boolean
941   :group 'wl-draft
942   :group 'wl-pref)
943
944 (defcustom wl-auto-flush-queue t
945   "*If non-nil, sending queue is flushed when network status is toggled."
946   :type 'boolean
947   :group 'wl-draft
948   :group 'wl-pref)
949
950 (defcustom wl-draft-reply-buffer-style 'split
951   "'split or 'full."
952   :type '(radio (const split)
953                 (const full))
954   :group 'wl-draft)
955
956 (defcustom wl-draft-queue-save-variables
957   '(wl-envelope-from wl-from
958     wl-smtp-posting-server wl-smtp-posting-user wl-smtp-posting-port
959     wl-smtp-authenticate-type wl-smtp-connection-type
960     wl-pop-before-smtp-server wl-pop-before-smtp-user wl-pop-before-smtp-port
961     wl-pop-before-smtp-stream-type wl-pop-before-smtp-authenticate-type
962     wl-nntp-posting-server wl-nntp-posting-server
963     wl-nntp-posting-user wl-nntp-posting-port wl-nntp-posting-stream-type)
964   "*Saving variables in queue info."
965   :type '(repeat (sexp :tag "Variable"))
966   :group 'wl-draft)
967
968 (defcustom wl-draft-sendlog t
969   "*Keep send state in log if non-nil."
970   :type 'boolean
971   :group 'wl-draft)
972
973 (defcustom wl-draft-sendlog-max-size 20000
974   "*Max file size of sendlog."
975   :type 'integer
976   :group 'wl-draft)
977
978 (defcustom wl-summary-default-number-column 5
979   "Number of columns in summary buffer."
980   :type 'integer
981   :group 'wl-summary)
982
983 (defcustom wl-summary-number-column-alist '(("\\*.*" . 6))
984   "Alist of folder and its number column.
985 If no matches, 'wl-summary-default-number-column' is used.
986 ex.
987 '((\"^%inbox@qmail-maildir\" . 9)
988   (\"^-.*@news-server\" . 6))"
989   :type '(repeat (cons (regexp :tag "Folder Regexp") integer))
990   :group 'wl-summary)
991
992 (defcustom wl-summary-highlight t
993   "Non-nil forces Summary buffer to be highlighted."
994   :type 'boolean
995   :group 'wl-summary
996   :group 'wl-highlight)
997
998 (defcustom wl-summary-lazy-highlight (and (boundp 'window-scroll-functions)
999                                           (not wl-on-xemacs))
1000   "Non-nil forces lazy summary highlighting using `window-scroll-functions'."
1001   :type 'boolean
1002   :group 'wl-summary
1003   :group 'wl-highlight)
1004
1005 (defcustom wl-summary-highlight-partial-threshold 1000
1006   "Summary is not highlighted entirely if there are lines more than this value.
1007 Available if only `wl-summary-lazy-highlight' is nil."
1008   :type 'integer
1009   :group 'wl-summary
1010   :group 'wl-highlight)
1011
1012 (defcustom wl-summary-partial-highlight-above-lines 30
1013   "If Summary has lines more than `wl-summary-highlight-partial-threshold',
1014 Summary lines are highlighted partialy above current position.
1015 Available if only `wl-summary-lazy-highlight' is nil."
1016   :type 'integer
1017   :group 'wl-summary
1018   :group 'wl-highlight)
1019
1020 (defcustom wl-summary-cache-use t
1021   "Non-nil forces wl-summary to use cache file."
1022   :type 'boolean
1023   :group 'wl-summary)
1024
1025 (defcustom wl-summary-auto-sync-marks t
1026   "Non-nil forces to synchronize unread/important marks."
1027   :type 'boolean
1028   :group 'wl-summary)
1029
1030 (defcustom wl-summary-cache-file ".wl-summary-cache"
1031   "*Cache file for summary mode contents."
1032   :type 'file
1033   :group 'wl-summary)
1034 (defcustom wl-summary-view-file ".wl-summary-view"
1035   "*Current summary view."
1036   :type 'file
1037   :group 'wl-summary)
1038 (defcustom wl-thread-top-file ".wl-thread-top"
1039   "*Current thread top entity... obsolete."
1040   :type 'file
1041   :group 'wl-summary)
1042 (defcustom wl-thread-entity-file ".wl-thread-entity"
1043   "*Thread entities."
1044   :type 'file
1045   :group 'wl-summary)
1046 (defcustom wl-thread-entity-list-file ".wl-thread-entity-list"
1047   "*Thread top entity list."
1048   :type 'file
1049   :group 'wl-summary)
1050
1051 (defcustom wl-print-buffer-func 'lpr-buffer
1052   "A function to print current buffer."
1053   :type 'function
1054   :group 'wl-pref)
1055
1056 (defcustom wl-ps-print-buffer-func
1057   (if window-system 'ps-print-buffer-with-faces 'ps-print-buffer)
1058   "A function to print current buffer with ps-print."
1059   :type 'function
1060   :group 'wl-pref)
1061
1062 ;;;; Preferences
1063 (defcustom wl-use-petname t
1064   "*Display petname in summary and default citation title."
1065   :type 'boolean
1066   :group 'wl-pref)
1067
1068 (defcustom wl-use-folder-petname
1069   '(modeline)
1070   "*List of situation using folder petname.
1071 Allowed situations are:
1072   modeline    : displayed on modeline.
1073   ask-folder  : displayed on minibuffer when ask folder.
1074   read-folder : can used for completion at `wl-summary-read-folder'."
1075   :type '(set (const modeline)
1076               (const ask-folder)
1077               (const read-folder))
1078   :group 'wl-summary
1079   :group 'wl-pref)
1080
1081 (defcustom wl-folder-petname-alist nil
1082   "A list of (realname . petname)."
1083   :type '(repeat (cons (string :tag "Realname") (string :tag "Petname")))
1084   :group 'wl-folder)
1085
1086 (defcustom wl-summary-weekday-name-lang "ja"
1087   "*Language to display week day."
1088   :type '(choice (const "ja")
1089                  (const "en")
1090                  (const "fr")
1091                  (const "de")
1092                  (string :tag "Other"))
1093   :group 'wl-summary
1094   :group 'wl-pref)
1095
1096 (defcustom wl-local-domain nil
1097   "*Domain part of this client (without hostname).
1098 Set this if (system-name) does not return FQDN."
1099   :type '(choice (const :tag "Use System Name" nil)
1100                  string)
1101   :group 'wl-pref)
1102
1103 (defcustom wl-message-id-domain nil
1104   "*Specific domain part of Message-ID."
1105   :type '(choice (const :tag "Use System Name" nil)
1106                  string)
1107   :group 'wl-pref)
1108
1109 (defcustom wl-break-pages t
1110   "*Break Pages at ^L."
1111   :type 'boolean
1112   :group 'wl-pref)
1113
1114 (defcustom wl-message-scroll-amount 5
1115   "*Scroll amount by SPC key."
1116   :type 'integer
1117   :group 'wl-pref)
1118
1119 (defcustom wl-message-window-size '(1 . 4)
1120   "*Size of summary and message window.  cons cell of (Summary : Message)."
1121   :type '(cons integer integer)
1122   :group 'wl-pref)
1123
1124 (defcustom wl-message-sort-field-list '("Return-Path" "Received" "^To" "^Cc"
1125                                         "Newsgroups" "Subject" "^From")
1126   "*Sort order of header fields.  Each elements are regexp of field name.
1127 (Not valid on tm.)"
1128   :type '(repeat (string :tag "Field Regexp"))
1129   :group 'wl-pref)
1130
1131 (defcustom wl-message-ignored-field-list nil
1132   "All fields that match this list will be hidden in message buffer.
1133 Each elements are regexp of field-name."
1134   :type '(repeat (string :tag "Field Regexp"))
1135   :group 'wl-pref)
1136
1137 (defcustom wl-message-visible-field-list nil
1138   "All fields that match this list will be displayed in message buffer.
1139 Each elements are regexp of field-name."
1140   :type '(repeat (string :tag "Field Regexp"))
1141   :group 'wl-pref)
1142
1143 (defcustom wl-folder-window-width 20
1144   "*Width of folder window."
1145   :type 'integer
1146   :group 'wl-folder
1147   :group 'wl-pref)
1148
1149 (defcustom wl-summary-recenter t
1150   "*Recenter on redisplay."
1151   :type 'boolean
1152   :group 'wl-summary
1153   :group 'wl-pref)
1154
1155 (defcustom wl-folder-use-frame nil
1156   "*Use dedicated frame for each folder if non-nil."
1157   :type 'boolean
1158   :group 'wl-pref)
1159
1160 (defcustom wl-stay-folder-window nil
1161   "*Stay folder window when folder is selected if non-nil."
1162   :type 'boolean
1163   :group 'wl-pref)
1164
1165 (defcustom wl-reply-subject-prefix "Re: "
1166   "*Prefix of the subject of the replied message."
1167   :type 'string
1168   :group 'wl-draft
1169   :group 'wl-pref)
1170
1171 (defcustom wl-draft-reply-use-address-with-full-name t
1172   "*Use address with full-name in the draft of replied message."
1173   :type 'boolean
1174   :group 'wl-pref
1175   :group 'wl-draft)
1176
1177 (defcustom wl-subject-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*"
1178   "*Regexp matching \"Re: \" in the subject line."
1179   :type 'regexp
1180   :group 'wl-draft
1181   :group 'wl-pref)
1182
1183 (defcustom wl-folder-many-unsync-threshold 70
1184   "*Folders which contains messages more than this number are highlighted
1185 with wl-highlight-folder-many-face."
1186   :type 'integer
1187   :group 'wl-folder
1188   :group 'wl-pref)
1189
1190 (defcustom wl-fcc nil
1191   "*Folder Carbon Copy."
1192   :type '(choice (const :tag "disable" nil)
1193                  string)
1194   :group 'wl-draft
1195   :group 'wl-pref)
1196
1197 (defcustom wl-bcc nil
1198   "*Blind Carbon Copy."
1199   :type '(choice (const :tag "disable" nil)
1200                  string)
1201   :group 'wl-draft
1202   :group 'wl-pref)
1203
1204 (defcustom wl-folder-desktop-name "Desktop"
1205   "*An implicit name of the folder top entity."
1206   :type 'string
1207   :group 'wl-folder
1208   :group 'wl-pref)
1209
1210 (defcustom wl-summary-indent-length-limit 46
1211   "*Limit of indent length for thread."
1212   :type 'integer
1213   :group 'wl-summary
1214   :group 'wl-pref)
1215
1216 (defcustom wl-summary-no-from-message "nobody@nowhere?"
1217   "*A string displayed in summary when no from field exists."
1218   :type 'string
1219   :group 'wl-summary)
1220
1221 (defcustom wl-summary-no-subject-message "(WL:No Subject in original.)"
1222   "*A string displayed in summary when no subject field exists."
1223   :type 'string
1224   :group 'wl-summary)
1225
1226 (defcustom wl-summary-cancel-message "I'd like to cancel my message."
1227   "*The body content of a cancel message."
1228   :type 'string
1229   :group 'wl-summary)
1230
1231 (defcustom wl-summary-width 80
1232   "*Set summary line width if non nil."
1233   :type 'integer
1234   :group 'wl-summary
1235   :group 'wl-pref)
1236
1237 (defcustom wl-summary-pick-field-default "Body"
1238   "*Default field for pick."
1239   :type '(radio (const "From")
1240                 (const "Subject")
1241                 (const "To")
1242                 (const "Cc")
1243                 (const "Body")
1244                 (const "Since")
1245                 (const "Before")
1246                 (const "Last")
1247                 (const "First")
1248                 (string :tag "Other"))
1249   :group 'wl-summary)
1250
1251 (defcustom wl-from-width 17
1252   "*From width in summary."
1253   :type 'integer
1254   :group 'wl-summary
1255   :group 'wl-pref)
1256
1257 (defcustom wl-subject-length-limit 35
1258   "*Subject width in summary."
1259   :type 'integer
1260   :group 'wl-summary
1261   :group 'wl-pref)
1262
1263 (defcustom wl-mime-charset (if wl-on-nemacs
1264                                'iso-2022-jp
1265                              'x-ctext)
1266   "*MIME Charset for summary and message."
1267   :type 'symbol
1268   :group 'wl-summary
1269   :group 'wl-pref)
1270
1271 (defcustom wl-generate-mailer-string-func 'wl-generate-user-agent-string
1272   "A function to create X-Mailer field string ."
1273   :type 'function
1274   :group 'wl-draft)
1275
1276 (defcustom wl-highlight-background-mode  (if (boundp 'hilit-background-mode)
1277                                              (or hilit-background-mode 'dark)
1278                                            'dark)
1279   "*Background mode of highlight (for Old Emacsen).  'dark or 'light."
1280   :type '(radio (const dark)
1281                 (const light))
1282   :group 'wl-highlight)
1283
1284 (defcustom wl-highlight-x-face-func nil
1285   "A function to display X-Face."
1286   :type 'function
1287   :group 'wl-highlight)
1288
1289 (defcustom wl-qmail-inject-program "/var/qmail/bin/qmail-inject"
1290   "Location of the qmail-inject program."
1291   :type '(string :tag "Program")
1292   :group 'wl-draft)
1293
1294 (defcustom wl-qmail-inject-args nil
1295   "Arguments passed to qmail-inject programs.
1296 This should be a list of strings, one string for each argument.
1297
1298 For e.g., if you wish to set the envelope sender address so that bounces
1299 go to the right place or to deal with listserv's usage of that address, you
1300 might set this variable to '(\"-f\" \"you@some.where\")."
1301   :type '(repeat (string :tag "Argument"))
1302   :group 'wl-draft)
1303
1304 (defcustom wl-rejected-letter-start
1305   "^[\t ]*-+[\t ]+\\(original\\|\\(\\(the \\)?unsent\\)\\) message\\( follows\\)?[\t ]+-+[\t ]*$"
1306   "Regexp specifying the beginning of the wrapper around a returned letter.
1307 This wrapper is generated by the mail system when rejecting a letter."
1308   :type 'regexp
1309   :group 'wl-draft)
1310
1311 (defcustom wl-ignored-forwarded-headers "\\(received\\|return-path\\|x-uidl\\)"
1312   "*All headers that match this regexp will be deleted when forwarding a message."
1313   :type 'regexp
1314   :group 'wl-draft)
1315
1316 (defcustom wl-ignored-resent-headers "\\(return-receipt\\|[bdf]cc\\)"
1317   "*All headers that match this regexp will be deleted when resending a message."
1318   :type 'regexp
1319   :group 'wl-draft)
1320
1321 (defcustom wl-refile-default-from-folder "+from"
1322   "*Folder name to refile by `wl-refile-guess-by-from'."
1323   :type '(string :tag "Folder")
1324   :group 'wl-pref)
1325
1326 (defcustom wl-summary-auto-refile-skip-marks
1327   (list wl-summary-new-mark
1328         wl-summary-unread-uncached-mark
1329         wl-summary-unread-cached-mark)
1330   "Persistent marks to skip auto-refiling."
1331   :type '(repeat (string :tag "Mark"))
1332   :group 'wl-summary)
1333
1334 (defcustom wl-summary-reserve-mark-list
1335   (list "o" "O" "D")
1336   "If a message is already marked as temporal marks in this list,
1337 the message is not marked by any mark command."
1338   :type '(repeat (string :tag "Temp-Mark"))
1339   :group 'wl-summary)
1340
1341 (defcustom wl-summary-skip-mark-list
1342   (list "D")
1343   "If a message is already marked as temporal marks in this list,
1344 the message is skipped at cursor move."
1345   :type '(repeat (string :tag "Temp-Mark"))
1346   :group 'wl-summary)
1347
1348 (defcustom wl-summary-incorporate-marks
1349   (list wl-summary-new-mark
1350         wl-summary-unread-uncached-mark)
1351   "Persistent marks to prefetch at `wl-summary-incorporate'."
1352   :type '(repeat (string :tag "Mark"))
1353   :group 'wl-summary)
1354
1355 (defcustom wl-refile-rule-alist nil
1356   "Refile rule alist.
1357 e.x.
1358 '(
1359   (\"From\"
1360    (\"teranisi@isl.ntt.co.jp\" . \"+teranisi\"))
1361   (\"x-ml-name\"
1362    (\"^Wanderlust\"    . \"+wl\")
1363    (\"^Elips\" . \"+elips\")))"
1364   :type '(repeat (list (string :tag "Field")
1365                        (repeat :inline t
1366                                (cons (regexp :tag "Value")
1367                                      (string :tag "Folder")))))
1368   :group 'wl-pref)
1369
1370 (defcustom wl-strict-diff-folders nil
1371   "List of regexps matching folders of which Wanderlust seriously counts unsync messages."
1372   :type '(choice (const :tag "Off" nil)
1373                  (repeat (regexp :tag "Folder Regexp")))
1374   :group 'wl-folder)
1375
1376 (defcustom wl-folder-use-server-diff t
1377   "Checked unread message number on IMAP4 server.
1378 Only IMAP4 folders have an effect."
1379   :type 'boolean
1380   :group 'wl-folder)
1381
1382 (defcustom wl-force-fetch-folders nil
1383   "Non-nil forces to fetch subfolders when user opened an 'access' folder."
1384   :type '(choice (const :tag "off" nil)
1385                  (const :menu-tag "on" t)
1386                  (repeat (regexp :tag "Folder Regexp")))
1387   :group 'wl-folder)
1388
1389 (defcustom wl-auto-check-folder-name nil
1390   "*The folder specified by this variable will be automatically checked
1391 at start time."
1392   :type '(choice (string :tag "Folder")
1393                  (repeat (string :tag "Folder"))
1394                  (const none))
1395   :group 'wl-folder)
1396
1397 (defcustom wl-auto-uncheck-folder-list '("\\$.*")
1398   "All folders that match this list won't be checked when group is
1399 automatically checked (or desktop is checked).
1400 This value is preceded by wl-auto-check-folder-list.
1401 Each elements are regexp of folder name."
1402   :type '(repeat (regexp :tag "Folder Regexp"))
1403   :group 'wl-folder)
1404
1405 (defcustom wl-auto-check-folder-list nil
1406   "All folders that match this list are checked when group is
1407 automatically checked (or desktop is checked).
1408 This value precedes wl-auto-uncheck-folder-list.
1409 Each elements are regexp of folder name."
1410   :type '(repeat (regexp :tag "Folder Regexp"))
1411   :group 'wl-folder)
1412
1413 (defcustom wl-show-plug-status-on-modeline t
1414   "If it is non-nil, show plugged status in modeline."
1415   :type 'boolean
1416   :group 'wl-highlight)
1417
1418 (defcustom wl-plug-state-indicator-on  " [ON] "
1419   "String used to show plugged status ON."
1420   :type 'string
1421   :group 'wl-highlight)
1422
1423 (defcustom wl-plug-state-indicator-off " [--] "
1424   "String used to show plugged status OFF."
1425   :type 'string
1426   :group 'wl-highlight)
1427
1428 (defcustom wl-biff-check-folder-list nil
1429   "All folders that match this list are automatically checked
1430 every intervals specified by wl-biff-check-interval."
1431   :type '(repeat (regexp :tag "Folder Regexp"))
1432   :group 'wl-highlight)
1433
1434 (defcustom wl-biff-check-interval 40
1435   "Number of seconds between updates of new mails in the mode line."
1436   :type 'integer
1437   :group 'wl-highlight)
1438
1439 (defcustom wl-biff-state-indicator-on "[\e$B")\e(B]"
1440   "String used to show biff status ON."
1441   :type 'string
1442   :group 'wl-highlight)
1443
1444 (defcustom wl-biff-state-indicator-off "[\e$B!>\e(B]"
1445   "String used to show biff status OFF."
1446   :type 'string
1447   :group 'wl-highlight)
1448
1449 (defcustom wl-mode-line-display-priority-list '(biff plug title)
1450   "Displaying order of items to be shown in modeline.  The first item will
1451 be placed in the leftmost.  The significant items are `biff' and `plug';
1452 otherwise, e.g. `title', corresponds to the things except for the biff
1453 staus nor the plugged status.  The default order is '(biff plug title)
1454 even if the value of this option is set to nil.  Here are some samples:
1455
1456 ;; Plugged status first:
1457 \(setq wl-mode-line-display-priority-list '(plug))
1458
1459 ;; Biff status, Title of Wanderlust, Plugged status:
1460 \(setq wl-mode-line-display-priority-list '(biff title plug))
1461
1462 "
1463   :type '(repeat (radio (const :format "%v " biff)
1464                         (const :format "%v " plug)
1465                         (sexp :tag "Other" :value title)))
1466   :group 'wl-highlight)
1467
1468 (defcustom wl-interactive-send nil
1469   "*If non-nil, require your confirmation when sending draft message."
1470   :type 'boolean
1471   :group 'wl-pref)
1472
1473 (defcustom wl-interactive-exit t
1474   "*If non-nil, require your confirmation when exiting WL."
1475   :type 'boolean
1476   :group 'wl-pref)
1477
1478 (defcustom wl-summary-move-order 'unread
1479   "*The order of priority when move in summary mode.
1480 If this variable is `unread', precede \"U\", \"!\", \"N\" mark.
1481 If this variable is `new', precede \"N\" mark."
1482   :type '(radio (const new)
1483                 (const unread))
1484   :group 'wl-summary)
1485
1486 (defvar wl-summary-move-direction-downward t)
1487
1488 (defcustom wl-summary-move-direction-toggle t
1489   "*If non-nil, search direction for the next message will be determined
1490 depends on previous search direction.
1491 It uses wl-summary-move-direction-downward as a direction flag."
1492   :type 'boolean
1493   :group 'wl-summary)
1494
1495 (defcustom wl-auto-select-first nil
1496   "*If non-nil, display selected first message when enter summary."
1497   :type 'boolean
1498   :group 'wl-pref)
1499
1500 (defcustom wl-auto-select-next nil
1501   "*If non-nil, offer to go to the next folder from the end of the previous.
1502 If the value is the symbol `unread', go to the next folder
1503 that no unread message exists.  If the value is the symbol `skip-no-unread',
1504 skip the folder that no unread message exists.
1505
1506 See also variable `wl-summary-next-no-unread-command'."
1507   :type '(radio (const :tag "off" nil)
1508                 (const :tag "on" t)
1509                 (const unread)
1510                 (const skip-no-unread))
1511   :group 'wl-pref)
1512
1513 (defcustom wl-cache-prefetch-folder-type-list '(imap4 nntp)
1514   "*All folder types that match this list prefetch next message,
1515 and reserved buffer cache."
1516   :type '(set (const localdir)
1517               (const localnews)
1518               (const imap4)
1519               (const nntp)
1520               (const pop3)
1521               (const archive)
1522               (const internal))
1523   :group 'wl-pref)
1524
1525 (defcustom wl-cache-prefetch-folder-list nil
1526   "*All folders that match this list prefetch next message,
1527 and reserved buffer cache.
1528 e.x.
1529 '(\"^[-%]\")"
1530   :type '(repeat (regexp :tag "Folder Regexp"))
1531   :group 'wl-pref)
1532
1533 (defcustom wl-cache-prefetch-get-next-func 'wl-summary-default-get-next-msg
1534   "*A function to get message number when prefetch next message."
1535   :type 'function
1536   :group 'wl-pref)
1537
1538 ;; obsolete
1539 ;(defvar wl-no-cache-folder-list '("^\\$.*")
1540 ;  "All folders that match this list won't be cached when reading messages.
1541 ;Each elements are regexp of folder name.")
1542
1543 (defcustom wl-summary-always-sticky-folder-list nil
1544   "All folders that match this list has sticky summary.
1545 Each elements are regexp of folder name."
1546   :type '(radio (const :tag "none" nil)
1547                 (const :tag "all" t)
1548                 (repeat (regexp :tag "Folder Regexp")))
1549   :group 'wl-pref)
1550
1551 (defcustom wl-no-save-folder-list '("^/.*$")
1552   "All folders that match this list won't save its msgdb.
1553 Each elements are regexp of folder name."
1554   :type '(repeat (regexp :tag "Folder Regexp"))
1555   :group 'wl-pref)
1556
1557 (defcustom wl-save-folder-list nil
1558   "All folders that match this list save its msgdb.
1559 Each elements are regexp of folder name."
1560   :type '(repeat (regexp :tag "Folder Regexp"))
1561   :group 'wl-pref)
1562
1563 (defcustom wl-folder-mime-charset-alist
1564   '(("^-alt\\.chinese" . big5)
1565     ("^-relcom\\." . koi8-r)
1566     ("^-tw\\." . big5)
1567     ("^-han\\." . euc-kr))
1568   "Charset alist.  If no match, `wl-mime-charset' is used."
1569   :type '(repeat (cons (regexp :tag "Folder Regexp") (symbol :tag "Charset")))
1570   :group 'wl-summary
1571   :group 'wl-pref)
1572
1573 (defcustom wl-folder-weekday-name-lang-alist
1574   '(("^-alt\\.chinese" . "en")
1575     ("^-relcom\\." . "en")
1576     ("^-tw\\." . "en")
1577     ("^-han\\." . "en"))
1578   "Weekday name lang alist.
1579 If no match, `wl-summary-weekday-name-lang' is used.
1580 e.x.
1581 '((\"xemacs-beta$\" . \"en\")
1582   (\"^-fj\" . \"ja\"))"
1583   :type '(repeat (cons (regexp :tag "Folder Regexp")
1584                        (choice (const "ja")
1585                                (const "en")
1586                                (const "fr")
1587                                (const "de")
1588                                (string :tag "Other"))))
1589   :group 'wl-pref)
1590
1591 (defcustom wl-folder-thread-indent-set-alist
1592   '(("^-alt\\.chinese" . (2 "+" "+" "|" "-" " "))
1593     ("^-relcom\\." . (2 "+" "+" "|" "-" " "))
1594     ("^-tw\\." . (2 "+" "+" "|" "-" " "))
1595     ("^-han\\." . (2 "+" "+" "|" "-" " ")))
1596   "Thread indent set alist.
1597 If no match, following indent set is used.
1598 (wl-thread-indent-level
1599  wl-thread-have-younger-brother-str
1600  wl-thread-youngest-child-str
1601  wl-thread-vertical-str
1602  wl-thread-horizontal-str
1603  wl-thread-space-str)
1604 e.x.
1605 '((\"xemacs-beta$\" . (2 \"+\" \"+\" \"|\" \"-\" \" \")))"
1606   :type '(repeat (cons (regexp :tag "Folder Regexp")
1607                        (group (integer :tag "Indent")
1608                               (string :tag "Yonger Brother")
1609                               (string :tag "Yonger Child")
1610                               (string :tag "Vertical")
1611                               (string :tag "Horizontal")
1612                               (string :tag "Space"))))
1613   :group 'wl-pref)
1614
1615 (defcustom wl-folder-sync-range-alist
1616   (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
1617                       (regexp-quote wl-queue-folder) "$")
1618               "all"))
1619   "*Default sync range alist.  If no matches, `wl-default-sync-range' is used."
1620   :type '(repeat (cons (regexp :tag "Folder Regexp")
1621                        (choice (const "update")
1622                                (const "all")
1623                                (const "rescan")
1624                                (const "first:")
1625                                (const "last:")
1626                                (const "no-sync")
1627                                (const :tag "none" nil))))
1628   :group 'wl-pref)
1629
1630 (defcustom wl-default-sync-range  "update"
1631   "*Default sync range."
1632   :type '(choice (const "update")
1633                  (const "all")
1634                  (const "rescan")
1635                  (const "first:")
1636                  (const "last:")
1637                  (const "no-sync")
1638                  (const :tag "none" nil))
1639   :group 'wl-pref)
1640
1641 (defcustom wl-ask-range t
1642   "*If non-nil, ask for a range for summary synchronization.
1643 If nil, always use default."
1644   :type 'boolean
1645   :group 'wl-pref)
1646
1647 (defcustom wl-folder-move-cur-folder nil
1648   "*Non-nil, move to current folder on folder-mode when goto folder."
1649   :type 'boolean
1650   :group 'wl-folder)
1651
1652 (defcustom wl-folder-check-async (not wl-on-nemacs)
1653   "*Check the folder asynchronous."
1654   :type 'boolean
1655   :group 'wl-folder)
1656
1657 (defcustom wl-folder-notify-deleted nil
1658   "*Non-nil, display negative number on folder-mode when message is deleted
1659 in folder. If the value is 'sync, msgdb would be synchronized."
1660   :type '(choice (const :tag "off" nil)
1661                  (const :tag "on" t)
1662                  (const sync))
1663   :group 'wl-folder)
1664
1665 (defcustom wl-summary-exit-next-move t
1666   "*Non-nil, move to next-unsync or next-entity when exit summary."
1667   :type 'boolean
1668   :group 'wl-summary)
1669
1670 (defcustom wl-summary-next-no-unread-command
1671   '(wl-summary-read wl-summary-down wl-summary-up)
1672   "*Command list available when the value of `wl-auto-select-next' is 'unread
1673 or 'skip-no-unread."
1674   :type '(repeat function)
1675   :group 'wl-summary)
1676
1677 (defcustom wl-summary-search-via-nntp 'confirm
1678   "*Non-nil, search message via nntp after `wl-summary-jump-to-msg-by-message-id'.  If the value is 'confirm, confirm before search."
1679   :type 'boolean
1680   :group 'wl-summary)
1681
1682 (defcustom wl-summary-keep-cursor-command
1683   '(wl-summary-goto-folder wl-summary-goto-last-visited-folder)
1684   "*Command list to keep cursor position when folder is changed to
1685 already existing summary."
1686   :type '(repeat function)
1687   :group 'wl-summary)
1688
1689 (defcustom wl-summary-showto-folder-regexp nil
1690   "Regexp specifying the folder that shows the To (or Newsgroups) field as
1691 Sender information in summary mode."
1692   :type '(choice (const :tag "none" nil)
1693                  regexp)
1694   :group 'wl-summary)
1695
1696 (defcustom wl-folder-removed-mark "#<removed>"
1697   "Mark for removed folder."
1698   :type 'string
1699   :group 'wl-folder)
1700
1701 (defcustom wl-folder-unsubscribe-mark "#"
1702   "Mark for unsubscribe folder."
1703   :type 'string
1704   :group 'wl-folder)
1705
1706 (defcustom wl-delete-folder-alist '(("^-" . remove))
1707   "*Alist of folder and delete policy.
1708 Each element is (folder-regexp . policy).
1709
1710 The policy is one of the followings:
1711 'remove or
1712 'null     : remove message.
1713 string    : refile to the specified folder.
1714 'trash or
1715 otherwise : refile to the `wl-trash-folder'.
1716 ex.
1717 '((\"^%\" . \"%#mh/trash\")
1718   (\"^-\" . remove)
1719   (\"^\\\\+\" . trash))"
1720   :type '(repeat (cons (regexp :tag "Folder Regexp")
1721                        (choice :tag "Policy"
1722                                (const remove)
1723                                (const :tag "remove(null)" null)
1724                                (const trash)
1725                                (const :tag "trash(other)" trash)
1726                                (string :tag "Folder"))))
1727   :group 'wl-folder)
1728
1729 (defcustom wl-refile-policy-alist '(("^[-=']" . copy)
1730                                     (".*" . move))
1731   "*List of refile policy.  Each element is (FOLDER-REGEXP . POLICY).
1732 POLICY is copy or move."
1733   :type '(repeat (cons (regexp :tag "Folder Regexp")
1734                        (choice (const copy)
1735                                (const move))))
1736   :group 'wl-summary
1737   :group 'wl-pref)
1738
1739 (defcustom wl-folder-hierarchy-access-folders '("-" "-alt")
1740   "*Access group folders to make hierarchy structure."
1741   :type '(repeat (string :tag "Folder"))
1742   :group 'wl-folder)
1743
1744 (defcustom wl-folder-init-load-access-folders nil
1745   "*Access group folders to load folder list on `wl-folder-init'.
1746 If this variable is non-nil,
1747 `wl-folder-init-no-load-access-folders' will be ignored."
1748   :type '(repeat (regexp :tag "Folder Regexp"))
1749   :group 'wl-folder)
1750
1751 (defcustom wl-folder-init-no-load-access-folders nil
1752   "*Access group folders to not load folder list on `wl-folder-init'.
1753 If `wl-folder-init-load-access-folders' is non-nil,
1754 this variable will be ignored."
1755   :type '(repeat (regexp :tag "Folder Regexp"))
1756   :group 'wl-folder)
1757
1758 (defcustom wl-folder-access-subscribe-alist nil
1759   "*Subscribe folders to fetching folder entries.
1760 Each element is (group-regexp (subscribe folder-regexp ...)).
1761 If subscribe is non-nil, subscribe when match folder-regexp.
1762 If subscribe is nil, unsubscribe when match folder-regexp.
1763
1764 ex.
1765 '((\"^-fj$\"   . (t   \"^-fj\\\\.\\\\(editor\\\\|mail\\\\|net\\\\|news\\\\)\"))
1766   (\"^-comp$\" . (t   \"^-comp\\\\.unix\" \"^-comp\\\\.sys\"))
1767   (\"^-$\"     . (nil \"^-alt\" \"^-rec\")))"
1768   :type '(repeat (cons (regexp :tag "Folder Regexp")
1769                        (list (boolean :tag "Subscribed")
1770                              (repeat :inline t
1771                                      (regexp :tag "Folder Regexp")))))
1772   :group 'wl-folder)
1773
1774 ;;; For Folder Manager
1775
1776 (defcustom wl-interactive-save-folders t
1777   "*Non-nil require your confirmation when save folders."
1778   :type 'boolean
1779   :group 'wl-folder)
1780
1781 (defcustom wl-fldmgr-make-backup t
1782   "*Non-nil make backup file when save folders."
1783   :type 'boolean
1784   :group 'wl-folder)
1785
1786 (defcustom wl-fldmgr-folders-indent "\t"
1787   "*Indent string for folders file."
1788   :type 'string
1789   :group 'wl-folder)
1790
1791 (defcustom wl-fldmgr-sort-func 'wl-fldmgr-sort-standard
1792   "*A function to sort folder."
1793   :type 'function
1794   :group 'wl-folder)
1795
1796 (defcustom wl-fldmgr-sort-group-first t
1797   "*Non-nil Group folder is first when sort."
1798   :type 'function
1799   :group 'wl-folder)
1800
1801 (defcustom wl-fldmgr-add-complete-with-current-folder-list nil
1802   "*If non-nil, completion for adding folder refers current folder list."
1803   :type 'boolean
1804   :group 'wl-folder)
1805
1806 (defcustom wl-fldmgr-make-filter-default "Body"
1807   "*Default filter key while making filter on Folder."
1808   :type '(radio (const "From")
1809                 (const "Subject")
1810                 (const "To")
1811                 (const "Cc")
1812                 (const "Body")
1813                 (const "Since")
1814                 (const "Before")
1815                 (const "Last")
1816                 (const "First")
1817                 (string :tag "Other"))
1818   :group 'wl-folder)
1819
1820 ;;; For Expire and Archive
1821
1822 (defcustom wl-expire-alist nil
1823   "Alist to decide a policy for expire.
1824 Each element is (folder-regexp (number or date) policy).
1825
1826 The policy is one of the followings:
1827 'remove  : remove messsage.
1828 'trash   : refile `wl-trash-folder'.
1829 string   : refile string folder.
1830 function : call function.
1831
1832 ex.
1833 '((\"^\\\\+ml/wl$\"             (number 500 510) wl-expire-archive-number1 t)
1834   (\"^\\\\+ml/\"                (number 300 305) wl-expire-archive-number2)
1835   (\"^\\\\+outbox$\"            (number 300) \"$outbox;lha\")
1836   (\"^\\\\(\\\\+tmp\\\\|\\\\+trash\\\\)$\"      (date 7) remove)
1837   (\"^\\\\+misc$\"              (date 14) trash))"
1838   :type '(repeat (choice (list :tag "No-match"
1839                                (regexp :tag "Folder Regexp")
1840                                (const nil))
1841                          (list :tag "Match"
1842                                (regexp :tag "Folder Regexp")
1843                                (list (radio :value number
1844                                             (const number)
1845                                             (const date))
1846                                      (list :inline t
1847                                            integer
1848                                            (repeat :inline t integer)))
1849                                (choice :tag "Policy"
1850                                        :value remove
1851                                        (const remove)
1852                                        (const trash)
1853                                        (string :tag "folder")
1854                                        function)
1855                                (repeat :inline t
1856                                        :tag "Arg for function"
1857                                        sexp))))
1858   :group 'wl-expire)
1859
1860 (defcustom wl-archive-alist '((".*" wl-archive-number1))
1861   "Alist to decide a policy for archive.
1862 Each element is (folder-regexp policy(function)).
1863
1864 ex.
1865 '((\"\\\\+work$\" wl-archive-date)
1866   (\"\\\\+ml/\"   wl-archive-number1)
1867   (\".*\"       wl-archive-number2))"
1868   :type '(repeat (list (regexp :tag "Folder Regexp")
1869                        function
1870                        (repeat :inline t
1871                                (sexp :tag "Argument"))))
1872   :group 'wl-expire)
1873
1874 (defcustom wl-summary-expire-reserve-marks
1875   (list wl-summary-important-mark
1876         wl-summary-new-mark
1877         wl-summary-unread-mark
1878         wl-summary-unread-uncached-mark
1879         wl-summary-unread-cached-mark)
1880   "Permanent marks of reserved message when expire.
1881 Don't reserve temporary mark message.
1882
1883 ex.
1884 'all  : reserved all permanent marks.
1885 'none : not reserve permanent marks.
1886 list  : reserved specified permanent marks."
1887   :type '(repeat (string :tag "Mark"))
1888   :group 'wl-expire)
1889
1890 (defcustom wl-expire-number-with-reserve-marks nil
1891   "If non-nil, include reserve message when expire by number."
1892   :type 'boolean
1893   :group 'wl-expire)
1894
1895 (defcustom wl-expire-add-seen-list t
1896   "*If non-nil, add seen message list when refile message at expire."
1897   :type 'boolean
1898   :group 'wl-expire)
1899
1900 (defcustom wl-expire-use-log nil
1901   "*If non-nil, write a log when expired."
1902   :type 'boolean
1903   :group 'wl-expire)
1904
1905 (defcustom wl-expire-folder-update-msgdb t
1906   "*Non-nil update summary msgdb when expire on folder mode."
1907   :type 'boolean
1908   :group 'wl-expire)
1909
1910 ;; for wl-expire-archive-{number1|number2}
1911 (defcustom wl-expire-archive-files 100
1912   "*The number of one archive folder."
1913   :type 'integer
1914   :group 'wl-expire)
1915
1916 ;; for wl-expire-archive-{number1|number2|date}
1917 (defcustom wl-expire-archive-get-folder-func
1918   'wl-expire-archive-get-folder
1919   "*A function to get archive folder name."
1920   :type 'function
1921   :group 'wl-expire)
1922
1923 (defcustom wl-expire-delete-oldmsg-confirm t
1924   "*If non-nil, require your confirmation when delete old message."
1925   :type 'boolean
1926   :group 'wl-expire)
1927
1928 ;; for wl-expire-archive-get-folder
1929 (defcustom wl-expire-archive-folder-type 'zip
1930   "*Archiver type of archive folder."
1931   :type '(radio (const zip)
1932                 (const lha)
1933                 (const zoo)
1934                 (const rar)
1935                 (const tar)
1936                 (const tgz)
1937                 (symbol :tag "Other"))
1938   :group 'wl-expire)
1939
1940 (defcustom wl-expire-archive-folder-name-fmt "%s-%%05d;%s" ;; $folder-00100;zip
1941   "*A format string for archive folder name."
1942   :type 'string
1943   :group 'wl-expire)
1944
1945 (defcustom wl-expire-archive-folder-num-regexp "-\\([0-9]+\\);"
1946   "*A regexp string for archive folder name."
1947   :type 'string
1948   :group 'wl-expire)
1949
1950 (defcustom wl-expire-archive-date-folder-name-fmt "%s-%%04d%%02d;%s"
1951                                                 ;; $folder-199812;zip
1952   "*A format string for archive date folder name."
1953   :type 'string
1954   :group 'wl-expire)
1955
1956 (defcustom wl-expire-archive-date-folder-num-regexp "-\\([0-9]+\\);"
1957   "*A regexp string for archive date folder name."
1958   :type 'string
1959   :group 'wl-expire)
1960
1961 (defcustom wl-expire-archive-folder-prefix nil
1962   "*Prefix for archive folder."
1963   :type '(radio (const :tag "nothing" nil)
1964                 (const :tag "full" t)
1965                 (const short))
1966   :group 'wl-expire)
1967
1968 ;;;; Highlights.
1969
1970 ;; highilght about summary
1971 (defcustom wl-highlight-max-summary-lines 10000
1972   "*If the summary is larger than this lines, don't highlight it."
1973   :type 'integer
1974   :group 'wl-highlight)
1975
1976 ;; highilght about draft and message
1977 (defcustom wl-highlight-body-too t
1978   "*In addition to header, highlight the body too.  if non nil."
1979   :type 'boolean
1980   :group 'wl-highlight)
1981
1982 (defcustom wl-highlight-message-header-alist
1983   '(("Subject[ \t]*:" . wl-highlight-message-important-header-contents)
1984     ("From[ \t]*:\\|To[ \t]*:" . wl-highlight-message-important-header-contents2)
1985     ("X-[^ \t]*:\\|User-Agent[ \t]*:" . wl-highlight-message-unimportant-header-contents))
1986   ""
1987   :type '(repeat (cons regexp face))
1988   :group 'wl-highlight)
1989
1990 (defcustom wl-highlight-message-header-button-alist
1991   (` (("^\\(References\\|Message-Id\\|In-Reply-To\\):" "<[^>]+>"
1992        0 wl-message-button-refer-article  0)
1993       ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)"
1994        1 wl-message-button-refer-article 3)))
1995   "Alist of headers and regexps to match buttons in message headers."
1996   :type '(repeat
1997           (list (regexp :tag "Header")
1998                 regexp
1999                 (integer :tag "Button")
2000                 (function :tag "Callback")
2001                 (repeat :tag "Data"
2002                         :inline t
2003                         (integer :tag "Regexp group"))))
2004   :group 'wl-highlight)
2005
2006 (defcustom wl-highlight-citation-prefix-regexp
2007   "^[>|:} ]*[>|:}]\\([^ \n>]*>\\)?\\|^[^ <\n>]*>"
2008   "All lines that match this regexp will be highlighted with
2009  `wl-highlight-message-cited-text-*' face."
2010   :type 'regexp
2011   :group 'wl-highlight)
2012
2013 (defcustom wl-highlight-highlight-citation-too nil
2014   "*Whether the whole citation line should go in the
2015 `wl-highlight-citation-face' face.
2016 If nil, the text matched by `wl-highlight-citation-prefix-regexp' is in the
2017 default face, and the remainder of the line is in the
2018 wl-highlight-message-cited-text face."
2019   :type 'boolean
2020   :group 'wl-highlight)
2021
2022 (defcustom wl-highlight-force-citation-header-regexp
2023   "^>>>.*$\\|^[ \t]*<[^>]*>[ \t]*$"
2024   "*The pattern to match the prolog of a cited block.
2025 Text in the body of a message which matches this will be displayed in
2026 the `wl-highlight-message-headers' face."
2027   :type 'regexp
2028   :group 'wl-highlight)
2029
2030 (defcustom wl-highlight-citation-header-regexp
2031   (concat "In article.*$\\|In message.*$\\|In the message.*$\\|"
2032           "^At[^\n]+\n[^\n]+wrote:\n\\|"
2033           "^.*\\(writes\\|wrote\\|said\\):\n")
2034   "*The pattern to match the prolog of a cited block.
2035 Text in the body of a message which matches this will be displayed in
2036 the `wl-highlight-message-headers' face."
2037   :type 'regexp
2038   :group 'wl-highlight)
2039
2040 (defcustom wl-highlight-max-header-size nil
2041   "*If the message header is larger than this many chars, don't highlight it.
2042 If this is nil, all headers will be highlighted."
2043   :type 'integer
2044   :group 'wl-highlight)
2045
2046 (defcustom wl-highlight-max-message-size 10000
2047   "*If the message body is larger than this many chars, don't highlight it.
2048 This is to prevent us from wasting time trying to fontify things like
2049 uuencoded files and large digests.  If this is nil, all messages will
2050 be highlighted."
2051   :type 'integer
2052   :group 'wl-highlight)
2053
2054 ;; highilght about signature (of draft and message)
2055 (defcustom wl-highlight-signature-separator
2056   '("\n--+\n" "\n\n--+.*\n*\\'")
2057   "List of regexps matching signature separator.
2058 It will be verified from head to tail looking for a separator.
2059 Verification will be done from the end of the buffer.
2060 No need to specify \"^-- $\" in this list,
2061 because it is verified by default.
2062 This variable can also be a regex."
2063   :type '(repeat regexp)
2064   :group 'wl-highlight)
2065
2066 (defcustom wl-max-signature-size 400
2067   "*If the signature is larger than this chars, don't treat it as a signature."
2068   :type 'integer
2069   :group 'wl-highlight)
2070
2071 ;; highilght about mouse
2072 (defcustom wl-use-highlight-mouse-line (and window-system
2073                                             (>= emacs-major-version 19))
2074   "*Highlight mouse line, if non nil."
2075   :type 'boolean
2076   :group 'wl-highlight)
2077
2078 ;; highilght about folder
2079 (defcustom wl-highlight-folder-with-icon
2080   (or (and (featurep 'xemacs)
2081            (featurep 'xpm))
2082       wl-on-emacs21)
2083   "*Highlight folder with icon(XEmacs or Emacs 21)."
2084   :type 'boolean
2085   :group 'wl-highlight)
2086 (defcustom wl-highlight-folder-by-numbers t
2087   "Highlight folder lines by numbers.
2088 If it is a number, only numbers will be highlighted."
2089   :type '(choice (const :tag "whole line" t)
2090                  (const :tag "only numbers" 1)
2091                  (const :tag "don't highlight" nil))
2092   :group 'wl-highlight)
2093
2094 (defcustom wl-highlight-signature-search-func 'wl-highlight-signature-search
2095   "Function to search signature area in the message body."
2096   :type 'function
2097   :group 'wl-highlight)
2098
2099 (defcustom wl-use-dnd (and wl-on-xemacs
2100                            (featurep 'dragdrop))
2101   "If Non-nil, support dragdrop feature in XEmacs."
2102   :type 'boolean
2103   :group 'wl-pref)
2104
2105 (defcustom wl-reset-plugged-alist t
2106   "*If non-nil, reset `elmo-plugged-alist' when startup."
2107   :type 'boolean
2108   :group 'wl-pref)
2109
2110 (defcustom wl-demo-display-logo (if (or (featurep 'xemacs)
2111                                         (module-installed-p 'image)
2112                                         (module-installed-p 'bitmap))
2113                                     t)
2114   "If it is T, show graphic logo in the startup screen.  You can set it to
2115 a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
2116   :type '(radio (const :tag "Off" nil)
2117                 (const :tag "On (any format)" t)
2118                 (const xpm)
2119                 (const xbm)
2120                 (const :tag "bitmap (using BITMAP-MULE)" bitmap))
2121   :group 'wl-pref)
2122
2123 ;;; Internal variables
2124 (defvar wl-init nil)
2125
2126 ;; For disconnected operations.
2127 (defvar wl-plugged-hook nil)
2128 (defvar wl-unplugged-hook nil)
2129 (defvar wl-plugged t)
2130
2131 ;; Internal variables used to modeline identifiers.
2132 (defvar wl-modeline-plug-status nil)
2133 (defvar wl-modeline-plug-state-on wl-plug-state-indicator-on)
2134 (defvar wl-modeline-plug-state-off wl-plug-state-indicator-off)
2135 (defvar wl-modeline-biff-status nil)
2136 (defvar wl-modeline-biff-state-on wl-biff-state-indicator-on)
2137 (defvar wl-modeline-biff-state-off wl-biff-state-indicator-off)
2138
2139 ;; Advanced thread view.
2140 (defvar wl-thread-indent-level 1
2141   "*Indent level for thread.")
2142 (defvar wl-thread-have-younger-brother-str "\e$B(2\e(B"
2143   "*A string for thread branch line.  It should contain one character.")
2144 (defvar wl-thread-youngest-child-str       "\e$B(1\e(B"
2145   "*A string for thread branch line.  It should contain one character.")
2146 (defvar wl-thread-vertical-str             "\e$B(-\e(B"
2147   "*A string for thread branch line.  It should contain one character.")
2148 (defvar wl-thread-horizontal-str           "\e$B(,\e(B"
2149   "*A string for thread branch line.  It should contain one character.")
2150 (defvar wl-thread-space-str                "\e$B!!\e(B"
2151   "*A string for thread branch line.  It should contain one character.")
2152
2153 (defvar wl-highlight-thread-indent-string-regexp "[^[<]*"
2154   "* A regexp string for thread indent...for highlight.")
2155
2156 ;; folder icons. filename relative to wl-icon-dir
2157 (defvar wl-opened-group-folder-icon "opened.xpm"
2158   "*Icon file for opened group folder.")
2159 (defvar wl-closed-group-folder-icon "closed.xpm"
2160   "*Icon file for closed group folder.")
2161 (defvar wl-nntp-folder-icon "news.xpm"
2162   "*Icon file for nntp folder.")
2163 (defvar wl-imap-folder-icon "imap.xpm"
2164   "*Icon file for imap folder.")
2165 (defvar wl-pop-folder-icon  "pop.xpm"
2166   "*Icon file for pop folder.")
2167 (defvar wl-localdir-folder-icon "local.xpm"
2168   "*Icon file for localdir folder.")
2169 (defvar wl-localnews-folder-icon "localnews.xpm"
2170   "*Icon file for localnews folder.")
2171 (defvar wl-internal-folder-icon "internal.xpm"
2172   "*Icon file for internal folder.")
2173 (defvar wl-multi-folder-icon "multi.xpm"
2174   "*Icon file for multi folder.")
2175 (defvar wl-filter-folder-icon "filter.xpm"
2176   "*Icon file for filter folder.")
2177 (defvar wl-archive-folder-icon "archive.xpm"
2178   "*Icon file for archive folder.")
2179 (defvar wl-pipe-folder-icon "pipe.xpm"
2180   "*Icon file for pipe folder.")
2181 (defvar wl-maildir-folder-icon "maildir.xpm"
2182   "*Icon file for maildir folder.")
2183 (defvar wl-empty-trash-folder-icon "trash-e.xpm"
2184   "*Icon file for emptied trash folder.")
2185 (defvar wl-trash-folder-icon "trash.xpm"
2186   "*Icon file for trash folder.")
2187 (defvar wl-draft-folder-icon "draft.xpm"
2188   "*Icon file for draft folder.")
2189 (defvar wl-queue-folder-icon "queue.xpm"
2190   "*Icon file for queue folder.")
2191 (defvar wl-plugged-icon "plugged.xpm"
2192   "*Icon file for plugged state.")
2193 (defvar wl-unplugged-icon "unplugged.xpm"
2194   "*Icon file for unplugged state.")
2195 (defvar wl-biff-mail-icon "letter.xpm"
2196   "*Icon file for mail existed state.")
2197 (defvar wl-biff-nomail-icon "no-letter.xpm"
2198   "*Icon file for no mail existed state.")
2199 (defvar wl-prog-uudecode "uudecode"
2200   "*uudecode program name.")
2201 (defvar wl-prog-uudecode-arg nil
2202   "*Arguments for uudecode program.")
2203 (defvar wl-prog-uudecode-no-stdout-option t
2204   "*If non-nil, uudecode program don't have option for output to stdout.")
2205
2206 ;; Obsolete variables. for compatibility.
2207 (defvar wl-address-filename wl-address-file)
2208 (make-obsolete-variable 'wl-address-filename 'wl-address-file)
2209 (defvar wl-score-default-file-name wl-score-default-file)
2210 (make-obsolete-variable 'wl-score-default-file-name 'wl-score-default-file)
2211 (defvar wl-draft-prepared-config-alist nil)
2212 (make-obsolete-variable 'wl-draft-prepared-config-alist 'wl-draft-config-alist)
2213 (defvar wl-score-files-directory wl-score-files-dir)
2214 (make-obsolete-variable 'wl-score-files-directory 'wl-score-files-dir)
2215 (defvar wl-summary-temp-above wl-summary-target-above)
2216 (make-obsolete-variable 'wl-summary-temp-above 'wl-summary-target-above)
2217
2218 ;; plug
2219 (defvar wl-plugged-plug-on "ON")
2220 (defvar wl-plugged-plug-off "--")
2221 (defvar wl-plugged-auto-off "**")
2222 (defvar wl-plugged-server-indent 2)
2223 (defvar wl-plugged-port-indent 4)
2224 (defvar wl-plugged-queue-status-column 25)
2225
2226 (require 'product)
2227 (product-provide (provide 'wl-vars) (require 'wl-version))
2228
2229 ;;; wl-vars.el ends here