Change bahavior of wl-summary-width and wl-summary-indent-length-limit.
[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. Nil means unlimited"
1331   :type '(choice (const :tag "Unlimited" nil)
1332                  integer)
1333   :group 'wl-summary
1334   :group 'wl-pref)
1335
1336 (defcustom wl-summary-no-from-message "nobody@nowhere?"
1337   "*A string displayed in summary when no from field exists."
1338   :type 'string
1339   :group 'wl-summary)
1340
1341 (defcustom wl-summary-no-subject-message "(WL:No Subject in original.)"
1342   "*A string displayed in summary when no subject field exists."
1343   :type 'string
1344   :group 'wl-summary)
1345
1346 (defcustom wl-summary-cancel-message "I'd like to cancel my message."
1347   "*The body content of a cancel message."
1348   :type 'string
1349   :group 'wl-summary)
1350
1351 (defcustom wl-summary-width 80
1352   "*Set summary line width if non nil."
1353   :type '(choice (const :tag "Don't truncate" nil)
1354                  integer)
1355   :group 'wl-summary
1356   :group 'wl-pref)
1357
1358 (defcustom wl-summary-pick-field-default "Body"
1359   "*Default field for pick."
1360   :type '(radio (const "From")
1361                 (const "Subject")
1362                 (const "To")
1363                 (const "Cc")
1364                 (const "Body")
1365                 (const "Since")
1366                 (const "Before")
1367                 (const "Last")
1368                 (const "First")
1369                 (string :tag "Other"))
1370   :group 'wl-summary)
1371
1372 (defcustom wl-summary-from-width 17
1373   "*From width in summary."
1374   :type 'integer
1375   :group 'wl-summary
1376   :group 'wl-pref)
1377
1378 (defcustom wl-summary-subject-length-limit nil
1379   "*Set subject width in summary when wl-summary-width is nil.
1380 Nil means unlimited"
1381   :type '(choice (const :tag "Unlimited" nil)
1382                  integer)
1383   :group 'wl-summary
1384   :group 'wl-pref)
1385
1386 (defcustom wl-mime-charset 'x-ctext
1387   "*MIME Charset for summary and message."
1388   :type 'symbol
1389   :group 'wl-summary
1390   :group 'wl-pref)
1391
1392 (defcustom wl-generate-mailer-string-function 'wl-generate-user-agent-string
1393   "A function to create X-Mailer field string ."
1394   :type 'function
1395   :group 'wl-draft)
1396
1397 (defcustom wl-highlight-background-mode  (if (boundp 'hilit-background-mode)
1398                                              (or hilit-background-mode 'dark)
1399                                            'dark)
1400   "*Background mode of highlight (for Old Emacsen).  'dark or 'light."
1401   :type '(radio (const dark)
1402                 (const light))
1403   :group 'wl-highlight)
1404
1405 (defcustom wl-highlight-x-face-function nil
1406   "A function to display X-Face."
1407   :type 'function
1408   :group 'wl-highlight)
1409
1410 (defcustom wl-qmail-inject-program "/var/qmail/bin/qmail-inject"
1411   "Location of the qmail-inject program."
1412   :type '(string :tag "Program")
1413   :group 'wl-draft)
1414
1415 (defcustom wl-qmail-inject-args nil
1416   "Arguments passed to qmail-inject programs.
1417 This should be a list of strings, one string for each argument.
1418
1419 For e.g., if you wish to set the envelope sender address so that bounces
1420 go to the right place or to deal with listserv's usage of that address, you
1421 might set this variable to '(\"-f\" \"you@some.where\")."
1422   :type '(repeat (string :tag "Argument"))
1423   :group 'wl-draft)
1424
1425 (defcustom wl-rejected-letter-start
1426   "^[\t ]*-+[\t ]+\\(original\\|\\(\\(the \\)?unsent\\)\\) message\\( follows\\)?[\t ]+-+[\t ]*$"
1427   "Regexp specifying the beginning of the wrapper around a returned letter.
1428 This wrapper is generated by the mail system when rejecting a letter."
1429   :type 'regexp
1430   :group 'wl-draft)
1431
1432 (defcustom wl-ignored-forwarded-headers "\\(received\\|return-path\\|x-uidl\\)"
1433   "*All headers that match this regexp will be deleted when forwarding a message."
1434   :type 'regexp
1435   :group 'wl-draft)
1436
1437 (defcustom wl-ignored-resent-headers "\\(return-receipt\\|[bdf]cc\\)"
1438   "*All headers that match this regexp will be deleted when resending a message."
1439   :type 'regexp
1440   :group 'wl-draft)
1441
1442 (defcustom wl-refile-default-from-folder "+from"
1443   "*Folder name to refile by `wl-refile-guess-by-from'."
1444   :type '(string :tag "Folder")
1445   :group 'wl-pref)
1446
1447 (defcustom wl-summary-auto-refile-skip-marks
1448   (list wl-summary-new-mark
1449         wl-summary-unread-uncached-mark
1450         wl-summary-unread-cached-mark)
1451   "Persistent marks to skip auto-refiling."
1452   :type '(repeat (string :tag "Mark"))
1453   :group 'wl-summary)
1454
1455 (defcustom wl-summary-reserve-mark-list
1456   (list "o" "O" "D")
1457   "If a message is already marked as temporal marks in this list,
1458 the message is not marked by any mark command."
1459   :type '(repeat (string :tag "Temp-Mark"))
1460   :group 'wl-summary)
1461
1462 (defcustom wl-summary-skip-mark-list
1463   (list "D")
1464   "If a message is already marked as temporal marks in this list,
1465 the message is skipped at cursor move."
1466   :type '(repeat (string :tag "Temp-Mark"))
1467   :group 'wl-summary)
1468
1469 (defcustom wl-summary-incorporate-marks
1470   (list wl-summary-new-mark
1471         wl-summary-unread-uncached-mark)
1472   "Persistent marks to prefetch at `wl-summary-incorporate'."
1473   :type '(repeat (string :tag "Mark"))
1474   :group 'wl-summary)
1475
1476 (defcustom wl-refile-rule-alist nil
1477   "Refile rule alist.
1478 e.x.
1479 '(
1480   (\"From\"
1481    (\"teranisi@isl.ntt.co.jp\" . \"+teranisi\"))
1482   (\"x-ml-name\"
1483    (\"^Wanderlust\"    . \"+wl\")
1484    (\"^Elips\" . \"+elips\")))"
1485   :type '(repeat (list (string :tag "Field")
1486                        (repeat :inline t
1487                                (cons (regexp :tag "Value")
1488                                      (string :tag "Folder")))))
1489   :group 'wl-pref)
1490
1491 (defcustom wl-strict-diff-folders nil
1492   "List of regexps matching folders of which Wanderlust seriously counts unsync messages."
1493   :type '(choice (const :tag "Off" nil)
1494                  (repeat (regexp :tag "Folder Regexp")))
1495   :group 'wl-folder)
1496
1497 (defcustom wl-folder-use-server-diff t
1498   "Checked unread message number on IMAP4 server.
1499 Only IMAP4 folders have an effect."
1500   :type 'boolean
1501   :group 'wl-folder)
1502
1503 (defcustom wl-force-fetch-folders nil
1504   "Non-nil forces to fetch subfolders when user opened an 'access' folder."
1505   :type '(choice (const :tag "off" nil)
1506                  (const :menu-tag "on" t)
1507                  (repeat (regexp :tag "Folder Regexp")))
1508   :group 'wl-folder)
1509
1510 (defcustom wl-auto-check-folder-name nil
1511   "*The folder specified by this variable will be automatically checked
1512 at start time."
1513   :type '(choice (string :tag "Folder")
1514                  (repeat (string :tag "Folder"))
1515                  (const none))
1516   :group 'wl-folder)
1517
1518 (defcustom wl-auto-uncheck-folder-list '("\\$.*")
1519   "All folders that match this list won't be checked when group is
1520 automatically checked (or desktop is checked).
1521 This value is preceded by wl-auto-check-folder-list.
1522 Each elements are regexp of folder name."
1523   :type '(repeat (regexp :tag "Folder Regexp"))
1524   :group 'wl-folder)
1525
1526 (defcustom wl-auto-check-folder-list nil
1527   "All folders that match this list are checked when group is
1528 automatically checked (or desktop is checked).
1529 This value precedes wl-auto-uncheck-folder-list.
1530 Each elements are regexp of folder name."
1531   :type '(repeat (regexp :tag "Folder Regexp"))
1532   :group 'wl-folder)
1533
1534 (defcustom wl-show-plug-status-on-modeline t
1535   "If it is non-nil, show plugged status in modeline."
1536   :type 'boolean
1537   :group 'wl-highlight)
1538
1539 (defcustom wl-plug-state-indicator-on  " [ON] "
1540   "String used to show plugged status ON."
1541   :type 'string
1542   :group 'wl-highlight)
1543
1544 (defcustom wl-plug-state-indicator-off " [--] "
1545   "String used to show plugged status OFF."
1546   :type 'string
1547   :group 'wl-highlight)
1548
1549 (defcustom wl-biff-check-folder-list nil
1550   "All folders that match this list are automatically checked
1551 every intervals specified by wl-biff-check-interval."
1552   :type '(repeat (regexp :tag "Folder Regexp"))
1553   :group 'wl-highlight)
1554
1555 (defcustom wl-biff-check-interval 40
1556   "Number of seconds between updates of new mails in the mode line."
1557   :type 'integer
1558   :group 'wl-highlight)
1559
1560 (defcustom wl-biff-state-indicator-on (if (and (featurep 'xemacs)
1561                                                (not (featurep 'mule)))
1562                                           "[Mail]"
1563                                         (decode-coding-string
1564                                          ;; Youbin mark
1565                                          (read "\"[\e$B\\\")\e(B]\"")
1566                                          (if (boundp 'MULE)
1567                                              '*iso-2022-jp*
1568                                            'iso-2022-jp)))
1569   "String used to show biff status ON."
1570   :type 'string
1571   :group 'wl-highlight)
1572
1573 (defcustom wl-biff-state-indicator-off (if (and (featurep 'xemacs)
1574                                                 (not (featurep 'mule)))
1575                                            "[--]"
1576                                           ;; Japanese short hyphen
1577                                          "[\e$B!>\e(B]")
1578   "String used to show biff status OFF."
1579   :type 'string
1580   :group 'wl-highlight)
1581
1582 (defcustom wl-mode-line-display-priority-list '(biff plug title)
1583   "Displaying order of items to be shown in modeline.  The first item will
1584 be placed in the leftmost.  The significant items are `biff' and `plug';
1585 otherwise, e.g. `title', corresponds to the things except for the biff
1586 staus nor the plugged status.  The default order is '(biff plug title)
1587 even if the value of this option is set to nil.  Here are some samples:
1588
1589 ;; Plugged status first:
1590 \(setq wl-mode-line-display-priority-list '(plug))
1591
1592 ;; Biff status, Title of Wanderlust, Plugged status:
1593 \(setq wl-mode-line-display-priority-list '(biff title plug))
1594
1595 "
1596   :type '(repeat (radio (const :format "%v " biff)
1597                         (const :format "%v " plug)
1598                         (sexp :tag "Other" :value title)))
1599   :group 'wl-highlight)
1600
1601 (defcustom wl-interactive-send t
1602   "*If non-nil, require your confirmation when sending draft message."
1603   :type 'boolean
1604   :group 'wl-pref
1605   :group 'wl-setting)
1606
1607 (defcustom wl-interactive-exit t
1608   "*If non-nil, require your confirmation when exiting WL."
1609   :type 'boolean
1610   :group 'wl-pref)
1611
1612 (defcustom wl-summary-move-order 'unread
1613   "*The order of priority when move in summary mode.
1614 If this variable is `unread', precede \"U\", \"!\", \"N\" mark.
1615 If this variable is `new', precede \"N\" mark."
1616   :type '(radio (const new)
1617                 (const unread))
1618   :group 'wl-summary
1619   :group 'wl-setting)
1620
1621 (defvar wl-summary-move-direction-downward t)
1622
1623 (defcustom wl-summary-move-direction-toggle t
1624   "*If non-nil, search direction for the next message will be determined
1625 depends on previous search direction.
1626 It uses wl-summary-move-direction-downward as a direction flag."
1627   :type 'boolean
1628   :group 'wl-summary)
1629
1630 (defcustom wl-auto-select-first nil
1631   "*If non-nil, display selected first message when enter summary."
1632   :type 'boolean
1633   :group 'wl-pref
1634   :group 'wl-setting)
1635
1636 (defcustom wl-auto-select-next nil
1637   "*If non-nil, offer to go to the next folder from the end of the previous.
1638 If the value is the symbol `unread', go to the next folder
1639 that no unread message exists.  If the value is the symbol `skip-no-unread',
1640 skip the folder that no unread message exists.
1641
1642 See also variable `wl-summary-next-no-unread-command'."
1643   :type '(radio (const :tag "off" nil)
1644                 (const :tag "on" t)
1645                 (const unread)
1646                 (const skip-no-unread))
1647   :group 'wl-pref
1648   :group 'wl-setting)
1649
1650 (defcustom wl-message-buffer-prefetch-folder-type-list t
1651   "*All folder types that match this list prefetch next message,
1652 and reserved buffer cache."
1653   :type `(choice (const :tag "all" t)
1654                  (const :tag "never" nil)
1655                  (set (const localdir)
1656                       (const localnews)
1657                       (const maildir)
1658                       (const imap4)
1659                       (const nntp)
1660                       (const pop3)
1661                       (const shimbun)
1662                       (const nmz)
1663                       (const archive)
1664                       (const mark)
1665                       (const cache)))
1666   :group 'wl-pref)
1667
1668 (defcustom wl-message-buffer-prefetch-folder-list nil
1669   "*All folders that match this list prefetch next message,
1670 and reserved buffer cache.
1671 e.x.
1672 '(\"^[-%]\")"
1673   :type '(repeat (regexp :tag "Folder Regexp"))
1674   :group 'wl-pref)
1675
1676 (defcustom wl-summary-always-sticky-folder-list nil
1677   "All folders that match this list has sticky summary.
1678 Each elements are regexp of folder name."
1679   :type '(radio (const :tag "none" nil)
1680                 (const :tag "all" t)
1681                 (repeat (regexp :tag "Folder Regexp")))
1682   :group 'wl-pref)
1683
1684 (defcustom wl-no-save-folder-list '("^/.*$" "^\\[.*$")
1685   "All folders that match this list won't save its msgdb.
1686 Each elements are regexp of folder name."
1687   :type '(repeat (regexp :tag "Folder Regexp"))
1688   :group 'wl-pref)
1689
1690 (defcustom wl-save-folder-list nil
1691   "All folders that match this list save its msgdb.
1692 Each elements are regexp of folder name."
1693   :type '(repeat (regexp :tag "Folder Regexp"))
1694   :group 'wl-pref)
1695
1696 (defcustom wl-folder-mime-charset-alist
1697   '(("^-alt\\.chinese" . big5)
1698     ("^-relcom\\." . koi8-r)
1699     ("^-tw\\." . big5)
1700     ("^-han\\." . euc-kr)
1701     ("@sponichi" . shift_jis))
1702   "Charset alist.  If no match, `wl-mime-charset' is used."
1703   :type '(repeat (cons (regexp :tag "Folder Regexp") (symbol :tag "Charset")))
1704   :group 'wl-summary
1705   :group 'wl-pref)
1706
1707 (defcustom wl-folder-weekday-name-lang-alist
1708   '(("^-alt\\.chinese" . "en")
1709     ("^-relcom\\." . "en")
1710     ("^-tw\\." . "en")
1711     ("^-han\\." . "en"))
1712   "Weekday name lang alist.
1713 If no match, `wl-summary-weekday-name-lang' is used.
1714 e.x.
1715 '((\"xemacs-beta$\" . \"en\")
1716   (\"^-fj\" . \"ja\"))"
1717   :type '(repeat (cons (regexp :tag "Folder Regexp")
1718                        (choice (const "ja")
1719                                (const "en")
1720                                (const "fr")
1721                                (const "de")
1722                                (string :tag "Other"))))
1723   :group 'wl-pref)
1724
1725 (defcustom wl-folder-thread-indent-set-alist
1726   '(("^-alt\\.chinese" . (2 "+" "+" "|" "-" " "))
1727     ("^-relcom\\." . (2 "+" "+" "|" "-" " "))
1728     ("^-tw\\." . (2 "+" "+" "|" "-" " "))
1729     ("^-han\\." . (2 "+" "+" "|" "-" " ")))
1730   "Thread indent set alist.
1731 If no match, following indent set is used.
1732 (wl-thread-indent-level
1733  wl-thread-have-younger-brother-str
1734  wl-thread-youngest-child-str
1735  wl-thread-vertical-str
1736  wl-thread-horizontal-str
1737  wl-thread-space-str)
1738 e.x.
1739 '((\"xemacs-beta$\" . (2 \"+\" \"+\" \"|\" \"-\" \" \")))"
1740   :type '(repeat (cons (regexp :tag "Folder Regexp")
1741                        (group (integer :tag "Indent")
1742                               (string :tag "Yonger Brother")
1743                               (string :tag "Yonger Child")
1744                               (string :tag "Vertical")
1745                               (string :tag "Horizontal")
1746                               (string :tag "Space"))))
1747   :group 'wl-pref)
1748
1749 (defcustom wl-folder-sync-range-alist
1750   (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
1751                       (regexp-quote wl-queue-folder) "$")
1752               "all"))
1753   "*Default sync range alist.  If no matches, `wl-default-sync-range' is used."
1754   :type '(repeat (cons (regexp :tag "Folder Regexp")
1755                        (choice (const "update")
1756                                (const "all")
1757                                (const "rescan")
1758                                (const "first:")
1759                                (const "last:")
1760                                (const "no-sync")
1761                                (const :tag "none" nil))))
1762   :group 'wl-pref)
1763
1764 (defcustom wl-default-sync-range  "update"
1765   "*Default sync range."
1766   :type '(choice (const "update")
1767                  (const "all")
1768                  (const "rescan")
1769                  (const "first:")
1770                  (const "last:")
1771                  (const "no-sync")
1772                  (const :tag "none" nil))
1773   :group 'wl-pref)
1774
1775 (defcustom wl-ask-range t
1776   "*If non-nil, ask for a range for summary synchronization.
1777 If nil, always use default."
1778   :type 'boolean
1779   :group 'wl-pref)
1780
1781 (defcustom wl-folder-process-duplicates-alist nil
1782   "Specify process type of duplicated messages.
1783 It should be a list of cons cell like: (REGEXP . TYPE)
1784 REGEXP is a regular expression string of folder name.
1785 TYPE is one of the symbols `hide' or `read'.
1786 `hide' means hide duplicated messages.
1787 `read' means mark as read duplicated messages.
1788 If TYPE is nil, do nothing for duplicated messages."
1789   :type '(repeat (cons (regexp :tag "Folder regexp")
1790                        (choice (const :tag "Hide" hide)
1791                                (const :tag "Mark as read" read))))
1792   :group 'wl-folder)
1793
1794 (defcustom wl-folder-move-cur-folder nil
1795   "*Non-nil, move to current folder on folder-mode when goto folder."
1796   :type 'boolean
1797   :group 'wl-folder)
1798
1799 (defcustom wl-folder-check-async t
1800   "*Check the folder asynchronous."
1801   :type 'boolean
1802   :group 'wl-folder)
1803
1804 (defcustom wl-folder-notify-deleted nil
1805   "*Non-nil, display negative number on folder-mode when message is deleted
1806 in folder. If the value is 'sync, msgdb would be synchronized."
1807   :type '(choice (const :tag "off" nil)
1808                  (const :tag "on" t)
1809                  (const sync))
1810   :group 'wl-folder)
1811
1812 (defcustom wl-summary-exit-next-move t
1813   "*Non-nil, move to next-unsync or next-entity when exit summary."
1814   :type 'boolean
1815   :group 'wl-summary)
1816
1817 (defcustom wl-summary-next-no-unread-command
1818   '(wl-summary-read wl-summary-down wl-summary-up)
1819   "*Command list available when the value of `wl-auto-select-next' is 'unread
1820 or 'skip-no-unread."
1821   :type '(repeat function)
1822   :group 'wl-summary)
1823
1824 (defcustom wl-summary-search-via-nntp 'confirm
1825   "*Non-nil, search message via nntp after `wl-summary-jump-to-msg-by-message-id'.  If the value is 'confirm, confirm before search."
1826   :type 'boolean
1827   :group 'wl-summary)
1828
1829 (defcustom wl-summary-keep-cursor-command
1830   '(wl-summary-goto-folder wl-summary-goto-last-visited-folder)
1831   "*Command list to keep cursor position when folder is changed to
1832 already existing summary."
1833   :type '(repeat function)
1834   :group 'wl-summary)
1835
1836 (defcustom wl-summary-showto-folder-regexp nil
1837   "Regexp specifying the folder that shows the To (or Newsgroups) field as
1838 Sender information in summary mode."
1839   :type '(choice (const :tag "none" nil)
1840                  regexp)
1841   :group 'wl-summary)
1842
1843 (defcustom wl-folder-removed-mark "#<removed>"
1844   "Mark for removed folder."
1845   :type 'string
1846   :group 'wl-folder)
1847
1848 (defcustom wl-folder-unsubscribe-mark "#"
1849   "Mark for unsubscribe folder."
1850   :type 'string
1851   :group 'wl-folder)
1852
1853 (defcustom wl-delete-folder-alist '(("^-" . remove))
1854   "*Alist of folder and delete policy.
1855 Each element is (folder-regexp . policy).
1856
1857 The policy is one of the followings:
1858 'remove or
1859 'null     : remove message.
1860 string    : refile to the specified folder.
1861 'trash or
1862 otherwise : refile to the `wl-trash-folder'.
1863 ex.
1864 '((\"^%\" . \"%#mh/trash\")
1865   (\"^-\" . remove)
1866   (\"^\\\\+\" . trash))"
1867   :type '(repeat (cons (regexp :tag "Folder Regexp")
1868                        (choice :tag "Policy"
1869                                (const remove)
1870                                (const :tag "remove(null)" null)
1871                                (const trash)
1872                                (const :tag "trash(other)" trash)
1873                                (string :tag "Folder"))))
1874   :group 'wl-folder)
1875
1876 (defcustom wl-refile-policy-alist '(("^[-=']" . copy)
1877                                     (".*" . move))
1878   "*List of refile policy.  Each element is (FOLDER-REGEXP . POLICY).
1879 POLICY is copy or move."
1880   :type '(repeat (cons (regexp :tag "Folder Regexp")
1881                        (choice (const copy)
1882                                (const move))))
1883   :group 'wl-summary
1884   :group 'wl-pref)
1885
1886 (defcustom wl-folder-hierarchy-access-folders '("-" "-alt")
1887   "*Access group folders to make hierarchy structure."
1888   :type '(repeat (string :tag "Folder"))
1889   :group 'wl-folder)
1890
1891 (defcustom wl-folder-init-load-access-folders nil
1892   "*Access group folders to load folder list on `wl-folder-init'.
1893 If this variable is non-nil,
1894 `wl-folder-init-no-load-access-folders' will be ignored."
1895   :type '(repeat (regexp :tag "Folder Regexp"))
1896   :group 'wl-folder)
1897
1898 (defcustom wl-folder-init-no-load-access-folders nil
1899   "*Access group folders to not load folder list on `wl-folder-init'.
1900 If `wl-folder-init-load-access-folders' is non-nil,
1901 this variable will be ignored."
1902   :type '(repeat (regexp :tag "Folder Regexp"))
1903   :group 'wl-folder)
1904
1905 (defcustom wl-folder-access-subscribe-alist nil
1906   "*Subscribe folders to fetching folder entries.
1907 Each element is (group-regexp (subscribe folder-regexp ...)).
1908 If subscribe is non-nil, subscribe when match folder-regexp.
1909 If subscribe is nil, unsubscribe when match folder-regexp.
1910
1911 ex.
1912 '((\"^-fj$\"   . (t   \"^-fj\\\\.\\\\(editor\\\\|mail\\\\|net\\\\|news\\\\)\"))
1913   (\"^-comp$\" . (t   \"^-comp\\\\.unix\" \"^-comp\\\\.sys\"))
1914   (\"^-$\"     . (nil \"^-alt\" \"^-rec\")))"
1915   :type '(repeat (cons (regexp :tag "Folder Regexp")
1916                        (list (boolean :tag "Subscribed")
1917                              (repeat :inline t
1918                                      (regexp :tag "Folder Regexp")))))
1919   :group 'wl-folder)
1920
1921 ;;; For Folder Manager
1922
1923 (defcustom wl-interactive-save-folders t
1924   "*Non-nil require your confirmation when save folders."
1925   :type 'boolean
1926   :group 'wl-folder
1927   :group 'wl-setting)
1928
1929 (defcustom wl-fldmgr-make-backup t
1930   "*Non-nil make backup file when save folders."
1931   :type 'boolean
1932   :group 'wl-folder)
1933
1934 (defcustom wl-fldmgr-folders-indent "\t"
1935   "*Indent string for folders file."
1936   :type 'string
1937   :group 'wl-folder)
1938
1939 (defcustom wl-fldmgr-sort-function 'wl-fldmgr-sort-standard
1940   "*A function to sort folder."
1941   :type 'function
1942   :group 'wl-folder)
1943
1944 (defcustom wl-fldmgr-sort-group-first t
1945   "*Non-nil Group folder is first when sort."
1946   :type 'function
1947   :group 'wl-folder)
1948
1949 (defcustom wl-fldmgr-add-complete-with-current-folder-list nil
1950   "*If non-nil, completion for adding folder refers current folder list."
1951   :type 'boolean
1952   :group 'wl-folder)
1953
1954 (defcustom wl-fldmgr-make-filter-default "Body"
1955   "*Default filter key while making filter on Folder."
1956   :type '(radio (const "From")
1957                 (const "Subject")
1958                 (const "To")
1959                 (const "Cc")
1960                 (const "Body")
1961                 (const "Since")
1962                 (const "Before")
1963                 (const "Last")
1964                 (const "First")
1965                 (string :tag "Other"))
1966   :group 'wl-folder)
1967
1968 ;;; For Expire and Archive
1969
1970 (defcustom wl-expire-alist nil
1971   "Alist to decide a policy for expire.
1972 Each element is (folder-regexp (number or date) policy).
1973
1974 The policy is one of the followings:
1975 'remove  : remove messsage.
1976 'trash   : refile `wl-trash-folder'.
1977 string   : refile string folder.
1978 function : call function.
1979
1980 ex.
1981 '((\"^\\\\+ml/wl$\"             (number 500 510) wl-expire-archive-number1 t)
1982   (\"^\\\\+ml/\"                (number 300 305) wl-expire-archive-number2)
1983   (\"^\\\\+outbox$\"            (number 300) \"$outbox;lha\")
1984   (\"^\\\\(\\\\+tmp\\\\|\\\\+trash\\\\)$\"      (date 7) remove)
1985   (\"^\\\\+misc$\"              (date 14) trash))"
1986   :type '(repeat (choice (list :tag "No-match"
1987                                (regexp :tag "Folder Regexp")
1988                                (const nil))
1989                          (list :tag "Match"
1990                                (regexp :tag "Folder Regexp")
1991                                (list (radio :value number
1992                                             (const number)
1993                                             (const date))
1994                                      (list :inline t
1995                                            integer
1996                                            (repeat :inline t integer)))
1997                                (choice :tag "Policy"
1998                                        :value remove
1999                                        (const remove)
2000                                        (const trash)
2001                                        (string :tag "folder")
2002                                        function)
2003                                (repeat :inline t
2004                                        :tag "Arg for function"
2005                                        sexp))))
2006   :group 'wl-expire)
2007
2008 (defcustom wl-archive-alist '((".*" wl-archive-number1))
2009   "Alist to decide a policy for archive.
2010 Each element is (folder-regexp policy(function)).
2011
2012 ex.
2013 '((\"\\\\+work$\" wl-archive-date)
2014   (\"\\\\+ml/\"   wl-archive-number1)
2015   (\".*\"       wl-archive-number2))"
2016   :type '(repeat (list (regexp :tag "Folder Regexp")
2017                        function
2018                        (repeat :inline t
2019                                (sexp :tag "Argument"))))
2020   :group 'wl-expire)
2021
2022 (defcustom wl-summary-expire-reserve-marks
2023   (list wl-summary-important-mark
2024         wl-summary-new-mark
2025         wl-summary-unread-mark
2026         wl-summary-unread-uncached-mark
2027         wl-summary-unread-cached-mark)
2028   "Permanent marks of reserved message when expire.
2029 Don't reserve temporary mark message.
2030
2031 ex.
2032 'all  : reserved all permanent marks.
2033 'none : not reserve permanent marks.
2034 list  : reserved specified permanent marks."
2035   :type '(repeat (string :tag "Mark"))
2036   :group 'wl-expire)
2037
2038 (defcustom wl-expire-number-with-reserve-marks nil
2039   "If non-nil, include reserve message when expire by number."
2040   :type 'boolean
2041   :group 'wl-expire)
2042
2043 (defcustom wl-expire-add-seen-list t
2044   "*If non-nil, add seen message list when refile message at expire."
2045   :type 'boolean
2046   :group 'wl-expire)
2047
2048 (defcustom wl-expire-use-log nil
2049   "*If non-nil, write a log when expired."
2050   :type 'boolean
2051   :group 'wl-expire)
2052
2053 (defcustom wl-expire-folder-update-msgdb t
2054   "*Non-nil update summary msgdb when expire on folder mode."
2055   :type 'boolean
2056   :group 'wl-expire)
2057
2058 ;; for wl-expire-archive-{number1|number2}
2059 (defcustom wl-expire-archive-files 100
2060   "*The number of one archive folder."
2061   :type 'integer
2062   :group 'wl-expire)
2063
2064 ;; for wl-expire-archive-{number1|number2|date}
2065 (defcustom wl-expire-archive-get-folder-function
2066   'wl-expire-archive-get-folder
2067   "*A function to get archive folder name."
2068   :type 'function
2069   :group 'wl-expire)
2070
2071 (defcustom wl-expire-delete-oldmsg-confirm t
2072   "*If non-nil, require your confirmation when delete old message."
2073   :type 'boolean
2074   :group 'wl-expire)
2075
2076 ;; for wl-expire-archive-get-folder
2077 (defcustom wl-expire-archive-folder-type 'zip
2078   "*Archiver type of archive folder."
2079   :type '(radio (const zip)
2080                 (const lha)
2081                 (const zoo)
2082                 (const rar)
2083                 (const tar)
2084                 (const tgz)
2085                 (symbol :tag "Other"))
2086   :group 'wl-expire)
2087
2088 (defcustom wl-expire-archive-folder-name-fmt "%s-%%05d;%s" ;; $folder-00100;zip
2089   "*A format string for archive folder name."
2090   :type 'string
2091   :group 'wl-expire)
2092
2093 (defcustom wl-expire-archive-folder-num-regexp "-\\([0-9]+\\);"
2094   "*A regexp string for archive folder name."
2095   :type 'string
2096   :group 'wl-expire)
2097
2098 (defcustom wl-expire-archive-date-folder-name-fmt "%s-%%04d%%02d;%s"
2099                                                 ;; $folder-199812;zip
2100   "*A format string for archive date folder name."
2101   :type 'string
2102   :group 'wl-expire)
2103
2104 (defcustom wl-expire-archive-date-folder-num-regexp "-\\([0-9]+\\);"
2105   "*A regexp string for archive date folder name."
2106   :type 'string
2107   :group 'wl-expire)
2108
2109 (defcustom wl-expire-archive-folder-prefix nil
2110   "*Prefix for archive folder."
2111   :type '(radio (const :tag "nothing" nil)
2112                 (const :tag "full" t)
2113                 (const short))
2114   :group 'wl-expire)
2115
2116 ;;;; Highlights.
2117
2118 ;; highilght about summary
2119 (defcustom wl-highlight-max-summary-lines 10000
2120   "*If the summary is larger than this lines, don't highlight it."
2121   :type 'integer
2122   :group 'wl-highlight)
2123
2124 ;; highilght about draft and message
2125 (defcustom wl-highlight-body-too t
2126   "*In addition to header, highlight the body too.  if non nil."
2127   :type 'boolean
2128   :group 'wl-highlight)
2129
2130 (defcustom wl-highlight-message-header-alist
2131   '(("Subject[ \t]*:" . wl-highlight-message-important-header-contents)
2132     ("From[ \t]*:\\|To[ \t]*:" . wl-highlight-message-important-header-contents2)
2133     ("X-[^ \t]*:\\|User-Agent[ \t]*:" . wl-highlight-message-unimportant-header-contents))
2134   ""
2135   :type '(repeat (cons regexp face))
2136   :group 'wl-highlight)
2137
2138 (defcustom wl-highlight-citation-prefix-regexp
2139   "^[>|:} ]*[>|:}]\\([^ \n>]*>\\)?\\|^[^ <\n>]*>"
2140   "All lines that match this regexp will be highlighted with
2141  `wl-highlight-message-cited-text-*' face."
2142   :type 'regexp
2143   :group 'wl-highlight)
2144
2145 (defcustom wl-highlight-highlight-citation-too nil
2146   "*Whether the whole citation line should go in the
2147 `wl-highlight-citation-face' face.
2148 If nil, the text matched by `wl-highlight-citation-prefix-regexp' is in the
2149 default face, and the remainder of the line is in the
2150 wl-highlight-message-cited-text face."
2151   :type 'boolean
2152   :group 'wl-highlight)
2153
2154 (defcustom wl-highlight-force-citation-header-regexp
2155   "^>>>.*$\\|^[ \t]*<[^>]*>[ \t]*$"
2156   "*The pattern to match the prolog of a cited block.
2157 Text in the body of a message which matches this will be displayed in
2158 the `wl-highlight-message-headers' face."
2159   :type 'regexp
2160   :group 'wl-highlight)
2161
2162 (defcustom wl-highlight-citation-header-regexp
2163   (concat "In article.*$\\|In message.*$\\|In the message.*$\\|"
2164           "^At[^\n]+\n[^\n]+wrote:\n\\|"
2165           "^.*\\(writes\\|wrote\\|said\\):\n")
2166   "*The pattern to match the prolog of a cited block.
2167 Text in the body of a message which matches this will be displayed in
2168 the `wl-highlight-message-headers' face."
2169   :type 'regexp
2170   :group 'wl-highlight)
2171
2172 (defcustom wl-highlight-max-header-size nil
2173   "*If the message header is larger than this many chars, don't highlight it.
2174 If this is nil, all headers will be highlighted."
2175   :type 'integer
2176   :group 'wl-highlight)
2177
2178 (defcustom wl-highlight-max-message-size 10000
2179   "*If the message body is larger than this many chars, don't highlight it.
2180 This is to prevent us from wasting time trying to fontify things like
2181 uuencoded files and large digests.  If this is nil, all messages will
2182 be highlighted."
2183   :type 'integer
2184   :group 'wl-highlight)
2185
2186 ;; highilght about signature (of draft and message)
2187 (defcustom wl-highlight-signature-separator
2188   '("\n--+\n" "\n\n--+.*\n*\\'")
2189   "List of regexps matching signature separator.
2190 It will be verified from head to tail looking for a separator.
2191 Verification will be done from the end of the buffer.
2192 No need to specify \"^-- $\" in this list,
2193 because it is verified by default.
2194 This variable can also be a regex."
2195   :type '(repeat regexp)
2196   :group 'wl-highlight)
2197
2198 (defcustom wl-max-signature-size 400
2199   "*If the signature is larger than this chars, don't treat it as a signature."
2200   :type 'integer
2201   :group 'wl-highlight)
2202
2203 ;; highilght about mouse
2204 (defcustom wl-use-highlight-mouse-line (and window-system
2205                                             (>= emacs-major-version 19))
2206   "*Highlight mouse line, if non nil."
2207   :type 'boolean
2208   :group 'wl-highlight)
2209
2210 ;; highilght about folder
2211 (defcustom wl-highlight-folder-with-icon
2212   (or (and (featurep 'xemacs)
2213            (featurep 'xpm))
2214       wl-on-emacs21)
2215   "*Highlight folder with icon(XEmacs or Emacs 21)."
2216   :type 'boolean
2217   :group 'wl-highlight)
2218 (defcustom wl-highlight-folder-by-numbers t
2219   "Highlight folder lines by numbers.
2220 If it is a number, only numbers will be highlighted."
2221   :type '(choice (const :tag "whole line" t)
2222                  (const :tag "only numbers" 1)
2223                  (const :tag "don't highlight" nil))
2224   :group 'wl-highlight)
2225
2226 (defcustom wl-highlight-signature-search-function 'wl-highlight-signature-search
2227   "Function to search signature area in the message body."
2228   :type 'function
2229   :group 'wl-highlight)
2230
2231 (defcustom wl-use-dnd (and wl-on-xemacs
2232                            (featurep 'dragdrop))
2233   "If Non-nil, support dragdrop feature in XEmacs."
2234   :type 'boolean
2235   :group 'wl-pref)
2236
2237 (defcustom wl-reset-plugged-alist t
2238   "*If non-nil, reset `elmo-plugged-alist' when startup."
2239   :type 'boolean
2240   :group 'wl-pref)
2241
2242 (defcustom wl-demo-display-logo (if (or (featurep 'xemacs)
2243                                         (module-installed-p 'image)
2244                                         (module-installed-p 'bitmap))
2245                                     t)
2246   "If it is T, show graphic logo in the startup screen.  You can set it to
2247 a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
2248   :type '(radio (const :tag "Off" nil)
2249                 (const :tag "On (any format)" t)
2250                 (const xpm)
2251                 (const xbm)
2252                 (const :tag "bitmap (using BITMAP-MULE)" bitmap))
2253   :group 'wl-pref)
2254
2255 ;;; Internal variables
2256 (defvar wl-init nil)
2257
2258 ;; For disconnected operations.
2259 (defvar wl-plugged-hook nil)
2260 (defvar wl-unplugged-hook nil)
2261 (defvar wl-plugged t)
2262
2263 ;; Internal variables used to modeline identifiers.
2264 (defvar wl-modeline-plug-status nil)
2265 (defvar wl-modeline-plug-state-on wl-plug-state-indicator-on)
2266 (defvar wl-modeline-plug-state-off wl-plug-state-indicator-off)
2267 (defvar wl-modeline-biff-status nil)
2268 (defvar wl-modeline-biff-state-on wl-biff-state-indicator-on)
2269 (defvar wl-modeline-biff-state-off wl-biff-state-indicator-off)
2270
2271 ;; Advanced thread view.
2272 (defvar wl-thread-indent-level 1
2273   "*Indent level for thread.")
2274 (defvar wl-thread-have-younger-brother-str "\e$B(2\e(B"
2275   "*A string for thread branch line.  It should contain one character.")
2276 (defvar wl-thread-youngest-child-str       "\e$B(1\e(B"
2277   "*A string for thread branch line.  It should contain one character.")
2278 (defvar wl-thread-vertical-str             "\e$B(-\e(B"
2279   "*A string for thread branch line.  It should contain one character.")
2280 (defvar wl-thread-horizontal-str           "\e$B(,\e(B"
2281   "*A string for thread branch line.  It should contain one character.")
2282 (defvar wl-thread-space-str                "\e$B!!\e(B"
2283   "*A string for thread branch line.  It should contain one character.")
2284
2285 (defvar wl-highlight-thread-indent-string-regexp "[^[<]*"
2286   "* A regexp string for thread indent...for highlight.")
2287
2288 ;; folder icons. filename relative to wl-icon-dir
2289 (defvar wl-opened-group-folder-icon "opened.xpm"
2290   "*Icon file for opened group folder.")
2291 (defvar wl-closed-group-folder-icon "closed.xpm"
2292   "*Icon file for closed group folder.")
2293 (defvar wl-nntp-folder-icon "news.xpm"
2294   "*Icon file for nntp folder.")
2295 (defvar wl-imap-folder-icon "imap.xpm"
2296   "*Icon file for imap folder.")
2297 (defvar wl-pop-folder-icon  "pop.xpm"
2298   "*Icon file for pop folder.")
2299 (defvar wl-localdir-folder-icon "local.xpm"
2300   "*Icon file for localdir folder.")
2301 (defvar wl-localnews-folder-icon "localnews.xpm"
2302   "*Icon file for localnews folder.")
2303 (defvar wl-internal-folder-icon "internal.xpm"
2304   "*Icon file for internal folder.")
2305 (defvar wl-multi-folder-icon "multi.xpm"
2306   "*Icon file for multi folder.")
2307 (defvar wl-filter-folder-icon "filter.xpm"
2308   "*Icon file for filter folder.")
2309 (defvar wl-archive-folder-icon "archive.xpm"
2310   "*Icon file for archive folder.")
2311 (defvar wl-pipe-folder-icon "pipe.xpm"
2312   "*Icon file for pipe folder.")
2313 (defvar wl-nmz-folder-icon "nmz.xpm"
2314   "*Icon file for namazu folder.")
2315 (defvar wl-shimbun-folder-icon "shimbun.xpm"
2316   "*Icon file for shimbun folder.")
2317 (defvar wl-maildir-folder-icon "maildir.xpm"
2318   "*Icon file for maildir folder.")
2319 (defvar wl-empty-trash-folder-icon "trash-e.xpm"
2320   "*Icon file for emptied trash folder.")
2321 (defvar wl-trash-folder-icon "trash.xpm"
2322   "*Icon file for trash folder.")
2323 (defvar wl-draft-folder-icon "draft.xpm"
2324   "*Icon file for draft folder.")
2325 (defvar wl-queue-folder-icon "queue.xpm"
2326   "*Icon file for queue folder.")
2327 (defvar wl-plugged-icon "plugged.xpm"
2328   "*Icon file for plugged state.")
2329 (defvar wl-unplugged-icon "unplugged.xpm"
2330   "*Icon file for unplugged state.")
2331 (defvar wl-biff-mail-icon "letter.xpm"
2332   "*Icon file for mail existed state.")
2333 (defvar wl-biff-nomail-icon "no-letter.xpm"
2334   "*Icon file for no mail existed state.")
2335 (defvar wl-prog-uudecode "uudecode"
2336   "*uudecode program name.")
2337 (defvar wl-prog-uudecode-arg nil
2338   "*Arguments for uudecode program.")
2339 (defvar wl-prog-uudecode-no-stdout-option t
2340   "*If non-nil, uudecode program don't have option for output to stdout.")
2341
2342 ;; plug
2343 (defvar wl-plugged-plug-on "ON")
2344 (defvar wl-plugged-plug-off "--")
2345 (defvar wl-plugged-auto-off "**")
2346 (defvar wl-plugged-server-indent 2)
2347 (defvar wl-plugged-port-indent 4)
2348 (defvar wl-plugged-queue-status-column 25)
2349
2350 ;;;; Obsolete variables.
2351
2352 ;; 2001-02-27: *-func -> *-function
2353 (elmo-define-obsolete-variable 'wl-summary-from-func
2354                                'wl-summary-from-function)
2355 (elmo-define-obsolete-variable 'wl-summary-subject-func
2356                                'wl-summary-subject-function)
2357 (elmo-define-obsolete-variable 'wl-summary-subject-filter-func
2358                                'wl-summary-subject-filter-function)
2359 (elmo-define-obsolete-variable 'wl-draft-send-func
2360                                'wl-draft-send-function)
2361 (elmo-define-obsolete-variable 'wl-draft-send-news-func
2362                                'wl-draft-send-news-function)
2363 (elmo-define-obsolete-variable 'wl-draft-send-mail-func
2364                                'wl-draft-send-mail-function)
2365 (elmo-define-obsolete-variable 'wl-print-buffer-func
2366                                'wl-print-buffer-function)
2367 (elmo-define-obsolete-variable 'wl-ps-print-buffer-func
2368                                'wl-ps-print-buffer-function)
2369 (elmo-define-obsolete-variable 'wl-generate-mailer-string-func
2370                                'wl-generate-mailer-string-function)
2371 (elmo-define-obsolete-variable 'wl-highlight-x-face-func
2372                                'wl-highlight-x-face-function)
2373 (elmo-define-obsolete-variable 'wl-fldmgr-sort-func
2374                                'wl-fldmgr-sort-function)
2375 (elmo-define-obsolete-variable 'wl-expire-archive-get-folder-func
2376                                'wl-expire-archive-get-folder-function)
2377 (elmo-define-obsolete-variable 'wl-highlight-signature-search-func
2378                                'wl-highlight-signature-search-function)
2379
2380 ;; 2000-01-25: temp mark -> target mark
2381 (elmo-define-obsolete-variable 'wl-summary-temp-above
2382                                'wl-summary-target-above)
2383
2384 ;; 2000-03-08
2385 (elmo-define-obsolete-variable 'wl-score-files-directory
2386                                'wl-score-files-dir)
2387
2388 ;; 1999-11-07: Unified with `wl-draft-config-alist'.
2389 (defvar wl-draft-prepared-config-alist nil)
2390 (make-obsolete-variable 'wl-draft-prepared-config-alist
2391                         'wl-draft-config-alist)
2392
2393 ;; 1999-10-10
2394 (elmo-define-obsolete-variable 'wl-address-filename
2395                                'wl-address-file)
2396 (elmo-define-obsolete-variable 'wl-score-default-file-name
2397                                'wl-score-default-file)
2398
2399
2400 (require 'product)
2401 (product-provide (provide 'wl-vars) (require 'wl-version))
2402
2403 ;;; wl-vars.el ends here