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