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