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