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