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