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