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