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