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